I am trying to load an unbound text box with the following DLookup function but I get nothing in the text box Me!txtArtistItemNum = DLookup("ArtistItemNum", "tblConsignments", "GalleryItemNum=" & "txtGetItemNum")
This next statement works fine for a text box that is connected to a table though. ArtistItemNum = DLookup("ArtistItemNum", "tblConsignments", "GalleryItemNum=" & "txtGetItemNum") Can you tell me what I m doing wrong? In both cases txtGetItemNum is an unbound text box that the user types in the search data and then clicks the search button which triggers the procedure the above statements are in.
Reply from Richard Rost:
If your txtGetItemNum is a TEXT value, as the name suggests, then you have to enclose it in quotes in your DLOOKUP statement:
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 10.