I'm using Access 2010. I'm having trouble with dlookup. I've spent over 5 hours searching forums, etc., and can't figure out what I'm doing wrong.
Table name: tblTier2
Fields: Tier2ID, autonumber
Tier2FieldType, text
I have an unbound list box on a main menu form.
The listbox control is numeric and called: lstItem
I tried putting the following in the textbox:
Neither of these worked:
= DLookUp("[Tier2FieldType]","[tblTier2]","[Tier2ID]=" & [lstitem])
=DLookUp("[Tier2FieldType]","[tblTier2]","[Tier2ID]=" & [lstitem].[column](0))
I wanted to see if the lstItem was the problem, so I put ths following in the text box. :
=[lstitem] (it returned the ID number selected from the list box, e.g., 809)
Your help would be so appreciated.
Thanks.