Reputation: 531
I am trying to duplicate this SQL Query in MS Access VBA. I keep running into syntax errors. I am not sure where to use single quotes or double quotes or what have you. I'm driving myself up a wall. Could someone please duplicate this SQL code for me in VBA. I am using the docmd.RunSQL(string) command. Thank you!
Delete [Carrier File Report].[Project Tasks Name] FROM [Carrier File Report] WHERE ((([Carrier File Report].[Project Tasks Name]) Like "'" * Test * "'"));
Upvotes: 1
Views: 3930
Reputation: 3351
If you are really looking for anything matching Test then
"... Like '*Test*'"
If Test
is a string variable you are trying to use then
"... Like '*" & Test & "*'"
Upvotes: 1
Reputation: 1271151
Is this what you intend?
WHERE [Carrier File Report].[Project Tasks Name] Like "*Test*"
Upvotes: 1