correct syntax

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

Would someone please help correct this syntax.

me.cmbco.rowsource= "SELECT ([firstname]+" ") & [lastname] AS Expr1 FROM
WBdata;"

Thanks in advance
Richard


--
 
Hi,
Try this:
me.cmbco.rowsource= "SELECT firstname & " " & lastname AS Fullname FROM WBdata"
 
Try:

me.cmbco.rowsource= "SELECT ([firstname]+"" "") & [lastname] AS Expr1 FROM
WBdata;"

(as 1 line)
 
Thanks a lot to both of you. It works perfectly. Will creating a function
for the fullname slow down the query?

Thanks again

Richard

--


Van T. Dinh said:
Try:

me.cmbco.rowsource= "SELECT ([firstname]+"" "") & [lastname] AS Expr1 FROM
WBdata;"

(as 1 line)

--
HTH
Van T. Dinh
MVP (Access)



Richard said:
Hi

Would someone please help correct this syntax.

me.cmbco.rowsource= "SELECT ([firstname]+" ") & [lastname] AS Expr1 FROM
WBdata;"

Thanks in advance
Richard
 
Yes since JET database engine has to refer the function
back to Access VBA. However, unless the Table has tens of
thousands of Records, you probably won't know the
difference.

HTH
Van T. Dinh
MVP (Access)
 
Thanks a mil

Richard

--


Van T. Dinh said:
Yes since JET database engine has to refer the function
back to Access VBA. However, unless the Table has tens of
thousands of Records, you probably won't know the
difference.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top