M
malhyp via AccessMonster.com
Can anyone suggest why this SQL wont work?
Someone has suggested that I have a few " in the wrong place.
I am missing the basic understanding about variable / string concatenation.
SELECT SupplierName, Location, ShortDescription FROM Query1 WHERE
'TimberSpecies' LIKE '%" & " + Replace(rsSearchResult__MMColParam, "'", "''")
+ " & "%' AND 'CategoryTable' LIKE '%" & " + Replace
(rsSearchResult__MMColParam2, "'", "''") + " & "%' AND 'Location' LIKE '%" &
" + Replace(rsSearchResult__MMColParam3, "'", "''") + " & "%' ORDER BY
SupplierName"
Thanks
Mally.
Someone has suggested that I have a few " in the wrong place.
I am missing the basic understanding about variable / string concatenation.
SELECT SupplierName, Location, ShortDescription FROM Query1 WHERE
'TimberSpecies' LIKE '%" & " + Replace(rsSearchResult__MMColParam, "'", "''")
+ " & "%' AND 'CategoryTable' LIKE '%" & " + Replace
(rsSearchResult__MMColParam2, "'", "''") + " & "%' AND 'Location' LIKE '%" &
" + Replace(rsSearchResult__MMColParam3, "'", "''") + " & "%' ORDER BY
SupplierName"
Thanks
Mally.