Show Records of current user only (1 Viewer)

Moore71

DEVELOPER
Local time
Today, 05:15
Joined
Jul 14, 2012
Messages
158
Hi, just can't figure how to display only records of current user in a textbox using DSum function in Access2010 VBA

Please help me out if you can.
Thanks in advance
 

jdraw

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Jan 23, 2006
Messages
15,364
A little more info please.
Do you have some sql/vba to show us what you re dealing with?
 

plog

Banishment Pending
Local time
Today, 00:15
Joined
May 11, 2011
Messages
11,613
...display only records of current user in a textbox using DSum function

That doesn't make much sense. DSum is an aggregate function, (meaning one value), but you said you want to display 'records' plural.

Can you better describe what you want (possibly using sample data) and also what you have tried to accomplish that?
 

Moore71

DEVELOPER
Local time
Today, 05:15
Joined
Jul 14, 2012
Messages
158
What i mean is that i have 2 or users that are entering some figures into a table.
There is a textbox that display the sum of their entries.
So what i want is how that textbox can sum only records of on current user, maybe using user ID as criteria to fetch the records and sum them. That's all
 

plog

Banishment Pending
Local time
Today, 00:15
Joined
May 11, 2011
Messages
11,613
You are thinking correctly with a DSum then. What did you try and how is it not working?
 

Moore71

DEVELOPER
Local time
Today, 05:15
Joined
Jul 14, 2012
Messages
158
I haven't tried anything really because I don't know how to insert the criteria [WHERE UserID=field1 of table A] or something like that

Maybe I should better use subform to display records from current user binding subform to mainform, if this cannot work
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:15
Joined
Sep 12, 2006
Messages
15,614
It's all doable, but it can be a pain.

the difficulty with this sort of stuff, is that you have to include some appropriate data in the table (or query) enteredby, amendedby, or similar - and then you have to write an interface to select and manage the data selections.

It's the same if you want a system where different users see information for selected depots, say.

You therefore have to build this selection functionality into every form/report where it is needed. It doesn't come with databases by default.
 

Moore71

DEVELOPER
Local time
Today, 05:15
Joined
Jul 14, 2012
Messages
158
Okay thanks anyway.
Let me see what I can try and come up with
 

Users who are viewing this thread

Top Bottom