PDA

View Full Version : Solved: DLookup help



Trevor
03-20-2008, 11:47 AM
I have a DLookup that is supose to look at the status column of the pswrdtbl by the [tech. name] field on form3
[
sttest = DLookup("[Status]", "PSwrdTbl", "Name = " & Forms![Form3]![Tech. Name])

I have tested it by changing "Name =" & forms![Form3]![Tech. Name])
To "name = name" to varify that it is that part of the dlookup that isn't functioning, when i did make the change and tested it I got the result I expected (the persons name from the table. but I want to get the status field from the table by using the persons name [tech. name] in form3
the nameing convention of textboxes is so on error checking when the msg is echo'd to the user they can read the name of the text box (no other reason as to why I am using spaces in my naming convention.
thanks for helping.

akn112
03-20-2008, 12:02 PM
i dont really understand what your asking but u should try


sttest = DLookup("[Status]", "PSwrdTbl", "Name = '" & Forms![Form3]![Tech. Name] & "'")

Trevor
03-20-2008, 01:06 PM
thanks AKN that returned the value I was hopping for , how could I possable have overlooked the & "'" at the end