DLookUp Problem

  • Thread starter Thread starter DS
  • Start date Start date
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
 
If its a text field, the value needs to be within apostrophes:

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

-Dorian
 
Back
Top