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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine 2 collumns in 1 text field

Status
Not open for further replies.

xuanb

Programmer
Apr 9, 2003
29
US
Hi,
I want to query 2 collumns and display the result in one text field. Here are my 2 Dlookups that I want to combine into something like "101 Access Forms". Thank you!

Me.ClassID = DLookup("[ClassID]", "tblClasses", "[ClassID] = 101")
Me.ClassName = DLookup("[ClassName]", "tblClasses", "[ClassID] = 101")
 
Wouldn't this work:
me.YourField=me.classID & " " & me.ClassName

HTH,
Eric
 
Yes! With a little modification...

Me.myfield = DLookup("[ClassID]", "tblClasses", "[ClassID] = 101")
Me.myfield = Me.myfield & " " & DLookup("[ClassName]", "tblClasses", "[ClassID] = 101")

Thank you for your help!
Xuan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top