I’m having a bit of a problem working out how to deal with the concatenation within a query definition in a procedure. Below is the code which is causing problems (I’ve edited out most of the fields being selected):
strSQL = “SELECT [OwnerTitle] & ” ” & [OwnerFirstName] & ” ” & [OwnerLastName] AS OwnerName, ” & _
“tblOwners.OwnerID FROM tblOwners WHERE tblOwners.OwnerID = ” & intAddressID & “;”
This fails because of the 2 ‘& ” ” &’ within the first line and I can’t figure out how to prevent it. If I remove these and just concatenate the fields the proc runs OK, but of course doesn’t show the name correctly.