Another Dlookup question

CAP101

Registered User.
Local time
Today, 15:39
Joined
Mar 18, 2001
Messages
20
I looked at the last post on the dlookup function but i am unable to get it to work in my code. I get the same error about automation.

txtFloat = DLookup("Float", "tblMash", "MashID =" & Forms!frmFishManual!LstMash) I've tried adding single and double quotes in different places but to no avail. If i use code such as:
txtFloat = DLookup("Float", "tblMash", "MashID = 'GNB') it works just fine. I copied the exact expression from the help files and changed the table and field names and it still gives me the same error about automation object. Please help!
 
Please excuse me, i've figured it out. To think, it only took me three days to get the criteria expression correct!

varFloat = DLookup("[Float]", "tblMash", "[MashID] = '" _
& Forms!frmFishManual!LstMash & "'")
 

Users who are viewing this thread

Back
Top Bottom