Hi everyone.
I need your help to solve an issue with a DLOOKUP with multiple criterias.
I already have solved the Dlookup when it "looks" for one criteria, I mean when a certain number is entered in a text box in a form, the dlookup see this number and returns ALL the information related to this record/row.
The dlookup "search" the "User" (text) inside the "RTS_Survey" table based in the information typed/entered in the field "Unique Survey_ID" (text) who is inside the form "Dental_Survey" and the working sintax is as follows:
=DLookUp("[user]","RTS_Survey","[Unique Survey-ID] = '" & [Forms]![Dental_Survey]![Unique Survey-ID] & "'")
Now I need to "combine" with 2 (two) conditions/criteria to get the "User" in another database. I need this:
When the "Full Name" (text) and the "ZIP" (text with the zip code input mask) match in one record, the dlookup return the user information, the same for the other fields such, Address, City, State, etc.
Until now I have this:
=DLookUp("[user]","Address","[Full Name] And [ZIP] = '" & [Forms]![Address]![Full name] And [Zip] & "'")
But anything I put/enter in the "Full Name" and "ZIP" only returns the information contained in the first record in the table.
Any help will be really appreciated.
Thanks in advance.
I need your help to solve an issue with a DLOOKUP with multiple criterias.
I already have solved the Dlookup when it "looks" for one criteria, I mean when a certain number is entered in a text box in a form, the dlookup see this number and returns ALL the information related to this record/row.
The dlookup "search" the "User" (text) inside the "RTS_Survey" table based in the information typed/entered in the field "Unique Survey_ID" (text) who is inside the form "Dental_Survey" and the working sintax is as follows:
=DLookUp("[user]","RTS_Survey","[Unique Survey-ID] = '" & [Forms]![Dental_Survey]![Unique Survey-ID] & "'")
Now I need to "combine" with 2 (two) conditions/criteria to get the "User" in another database. I need this:
When the "Full Name" (text) and the "ZIP" (text with the zip code input mask) match in one record, the dlookup return the user information, the same for the other fields such, Address, City, State, etc.
Until now I have this:
=DLookUp("[user]","Address","[Full Name] And [ZIP] = '" & [Forms]![Address]![Full name] And [Zip] & "'")
But anything I put/enter in the "Full Name" and "ZIP" only returns the information contained in the first record in the table.
Any help will be really appreciated.
Thanks in advance.