using dlookup

mech55

Registered User.
Local time
Today, 08:13
Joined
Aug 26, 2005
Messages
61
one of my dlookup's looks like this

varx5= dlookup("[Defect Fixed?]", "Defect_Log", "[Serial_Number]=text5")

I need to add another condition in there, but I don't know how I should do it. Do I use And after text5 or maybe another comma and another condition?

thanks,
 
Hi mech55
You use AND after the first criteria but if you are anything like me you will get muddled with all the " and ' and & involved.
I usually try every combination I can think of and if it still isn't working post back and some kind and generous SQL genuis usually manages to sort it out in the blink of an eye - uncanny really but I get we are all odd in some way or another.
Hope this helps
 
My code looks like this and I need to find both a variable and a string. I've tried many combinations.

Code:
varx5 = DLookup("[Defect Fixed?]", "Defect_Log", "[Serial_Number]= text7 And [Station]='Station 1'")

text7 is a textbox that i'm pulling the value from and "Station 1" is a regular old string. I'm trying to pull [defect fixed?] which is a true/false from serial = text7 with a string that equals 'station 1' from [station] field.
 

Users who are viewing this thread

Back
Top Bottom