Comma woes

Niniel

Registered User.
Local time
Today, 16:20
Joined
Sep 28, 2006
Messages
191
Forms!frmRSC!sfrmRSCDisclosures1!Speaker.RowSource = "SELECT tblDisclosures.DisclosureID, tblSpeakers!SPNameLast & ", " & tblSpeakers!SpNameFirst AS SPNames FROM tblSpeakers RIGHT JOIN tblDisclosures ON tblSpeakers.SpeakerID = tblDisclosures.SpeakerID;"

The comma in the expression SPNames is creating a problem - I am getting an "expected end of statement" error.
What do I need to do to make this work?

Thank you.
 
Try:
Forms!frmRSC!sfrmRSCDisclosures1!Speaker.RowSource = "SELECT tblDisclosures.DisclosureID, tblSpeakers!SPNameLast & ', ' & tblSpeakers!SpNameFirst AS SPNames FROM tblSpeakers RIGHT JOIN tblDisclosures ON tblSpeakers.SpeakerID = tblDisclosures.SpeakerID;"
 
No error, but now I see only the last name in the combo box, not "last name, first name". :(
 
Single quotes around the comma.
 

Users who are viewing this thread

Back
Top Bottom