[AccessD] SQL concatenation

Mark A Matte markamatte at hotmail.com
Mon Feb 2 10:01:10 CST 2009


Long shot...but shouldn't those be single quotes?
 
Mark

----------------------------------------
> From: wdhindman at dejpolsystems.com
> To: accessd at databaseadvisors.com
> Date: Mon, 2 Feb 2009 10:47:33 -0500
> 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
_________________________________________________________________
Hotmail® goes where you go. On a PC, on the Web, on your phone. 
http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 



More information about the AccessD mailing list