DLookUp Problem

D

DS

I have this DLookup and the problem seems to be the last criteria where
GroupLevel = 1 is.
I believe my Syntax is wrong.

Me.TxtGroup = Nz(DLookup("GroupID", "tblInfoGroup", _
"tblInfoGroup.TerminalID = " & Forms!frmQuikBar!TxtStation &
" " & _
"AND tblInfoGroup.DayID = " & Forms!frmQuikBar!TxtDay & " "
& _
"AND tblInfoGroup.MenuID = " & Forms!frmQuikBar!TxtMenuID &
" " & _
"AND tblInfoGroup.MenuCatID = " &
Forms!frmQuikBar!TxtSection & " " & _
"AND tblInfoGroup.ItemID = " & Forms!frmQuikBar!TxtItemID &
" " & _
"AND tblInfoGroup.GroupLevel = 1"), 0)

Thanks DS
 
M

mscertified

If its a text field, the value needs to be within apostrophes:

"AND tblInfoGroup.GroupLevel = '1'"), 0)

-Dorian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DLookUp Syntax 5
SQL UPDATE Problem 5
UPDATE SQL Problem 1
Update Query Problem 2
DCount Syntax 6
Dlookup Query 2
Dlookup Problem 1
If Statement Problem 1

Top