Full Version: Concatenate Two Fields In Sql Statement On Form
UtterAccess Forums > Microsoft® Access > Access Forms
Dexter
I have a form with a combo box where the record source is this: SELECT tblMain.txtName1, tblMain.txtName1 FROM tblMain WHERE chkDisable = False ORDER BY [txtName1];
want to contatenate txtName1 with a field called txtSecondName. How do I do that?
Doug Steele
SELECT tblMain.txtName1, tblMain.txtName1 & " " & tblMain.txtSecondName FROM tblMain WHERE chkDisable = False ORDER BY [txtName1];
If it's possible that txtName1 might be Null and you don't want the space before txtSecondName in that case, use
SELECT tblMain.txtName1, (tblMain.txtName1 + " ") & tblMain.txtSecondName FROM tblMain WHERE chkDisable = False ORDER BY [txtNa
Dexter
Perfect, thank you!!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.