Drew Wutka
DWUTKA at Marlow.com
Mon Feb 2 10:01:04 CST 2009
Ummmmm, do you have the number of columns set with the difference in column count? Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Monday, February 02, 2009 9:48 AM To: Access Developers discussion and problem solving Subject: [AccessD] SQL concatenation Group ...this works fine lstFound.RowSource = "SELECT DISTINCTROW tblOrg.OrgID, tblOrg.OrgName, tblOrg.Address, tblOrg.City, tblOrg.StateOrProvince, tblOrg.Country, tblOrg.Buyer, tblOrg.Inactive FROM tblOrg WHERE (((tblOrg.OrgName) Like [txtSearchExpression]) And ((tblOrg.Buyer) = True) And ((tblOrg.Inactive) = False)) ORDER BY tblOrg.OrgName;" ...but when I try to concatenate 3 of the fields, I get a syntax error lstFound.RowSource = "SELECT DISTINCTROW tblOrg.OrgID, tblOrg.OrgName, tblOrg.Address, [tblOrg]![City] & ", " & [tblOrg]![StateOrProvince] & " " & [tblOrg]![Country]) AS CSC, tblOrg.Buyer, tblOrg.Inactive FROM tblOrg WHERE (((tblOrg.OrgName) Like [txtSearchExpression]) And ((tblOrg.Buyer) = True) AND ((tblOrg.Inactive) = False)) ORDER BY tblOrg.OrgName;" ...any help appreciated. William -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.