Dlookup

sambrierley

Registered User.
Local time
Yesterday, 21:08
Joined
Apr 24, 2014
Messages
56
Hi all,

im pretty sure ive got the quotes in the wrong place somewhere but its driving me round the bend.

Code:
DLookup("[Explanation]", "[Hours]", "[AlphaName] = '" & AlphaName & "'" And "[Week No] =" & WeekNo And "[ID] =" & IDMin)

AlphaName is a string
both WeekNo and ID are integers.

thanks for any help.
 
Code:
DLookup("[Explanation]", _
        "[Hours]", _
        "[AlphaName] = '" & AlphaName & _
        "' And [Week No] = " & WeekNo & _
        " And [ID] = " & IDMin)
Does this help?
 
it does thank you.
as a side ive been struggling with multiple criteria for a while, setting it out like that is a good way of doing it. thank you
 
Try;
Code:
DLookUp("[Explanation]", "[Hours]", "[AlphaName] = '" & [AlphaName] & "'  And [Week No] =" & [WeekNo] & "And [ID] =" & [IDMin])

Edit - Too late :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom