Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to dlookup in two fields to get needed info 1

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
The first piece of code below works find and is triggered
from a checkbox.

The second piece of code differs in that in order to find
the login name it has to look in two Fields from the
table *1* FirstName and *2* LastName.

I am stumped on how to make the code do this. My example,
2nd piece of code is wrong and I have not been able to
correct this. Does anyone have any suggestions. I need
to lookup both FirstName and Lastname in order to come up
with a LoginName. Thanks for any help.

Code:
DLookup("LoginName", "ChangeFormUserNameTbl", "ActualName='" & Me.FirstName & "'" & Me.LastName & "'") & "@nmhg.com"


Code:
DLookup("LoginName", "EmailNameTbl", "FirstName='" , "LastName='", & Me.FirstName & "'" & Me.LastName & "'") & "@nmhg.com"
 
Please ignore my last post. I have other issues before
I need the dlookup.
 
Code:
DLookup("LoginName", "EmailNameTbl", "FirstName='" & Me.FirstName & "' AND LastName='" & Me.LastName & "'") & "@nmhg.com"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top