Why is this strSQL not working??? Please Help

G

Guest

OK,

In your original post you said: "If I take out the Dlookup part all is well
......".

What does the SQL string look like if you add: Debug.Print SQL ?



If you replace the DLOOKUP() with a value, say 5, is all still well?

Const strSQL = "SELECT tblLister.lListerID, tblLister.lFirstName,
tblLister.lLastName, tblLister.leMailAddress, tblLister.lFaxNumber,
tblLister.lCellPhoneNumber, tblLister.lOtherPhoneNumber,
tblLister.lPhoneNumber, 5 AS BrokerID, tblListerListing.llListingID, <<<<<<<
tblListerListing.llSaleAmount, tblListerListing.llInActiveOrSold,
<snip>

Debug.Print SQL


What does the string look like?


I still say that embedding a VBA function inside a SQL string, the function
won't be evaluated. The function return value needs to be concatenated to the
SQL string.

Did you try concatenating the DLOOKUP() function to the SQL string (see my
first post)?

My ideas on your problem..... I'll back to sleep now.
 
G

Gina Whipp

SLEEP!!! You get to SLEEP???? I got it working Steve by using Inconsistent
Updates, not the best way but it works for what the end-user wants and no
talking him out of it (I tried).
 
Top