Locopete99
Registered User.
- Local time
- Yesterday, 16:27
- Joined
- Jul 11, 2016
- Messages
- 163
Hi,
I am trying to write a query that looks up the current user and returns all records where that person is the salesman.
My attempt is below, where i assumed that it would be easy enough to use a Dlookup in the criteria.
Can you nudge me in the right direction?
I am trying to write a query that looks up the current user and returns all records where that person is the salesman.
My attempt is below, where i assumed that it would be easy enough to use a Dlookup in the criteria.
Can you nudge me in the right direction?
Code:
SELECT Tbl_ShikomiRegister.[Blanket Agreement Number], Tbl_ShikomiRegister.Salesman, Tbl_ShikomiRegister.[Part Number], Tbl_ShikomiRegister.[Months to run out]
FROM Tbl_ShikomiRegister
WHERE (((Tbl_ShikomiRegister.Salesman)=DLookUp("[User Name]","Tbl_User","[login]= '" & "fOSUserName" & "'")));