View Single Post
  #38  
Old February 28th, 2007, 04:29 AM posted to microsoft.public.access.formscoding,microsoft.public.access.queries,microsoft.public.access.modulescoding
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Why is this strSQL not working??? Please Help

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).

--
Gina Whipp


"SteveS" limbim53 at yahoo dot com wrote in message
...
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.

--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)