correct syntax

R

Richard

Hi

Would someone please help correct this syntax.

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

Thanks in advance
Richard


--
 
D

Dan Artuso

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

Van T. Dinh

Try:

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

(as 1 line)
 
R

Richard

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
 
V

Van T. Dinh

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

Richard

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top