sql in VBA code

ice051505

Registered User.
Local time
Yesterday, 18:16
Joined
Feb 11, 2013
Messages
42
Hi all, just quick question

this is my sql on VBA code

Sql1 ="Select [SmallArea] From [AreaQuery1] WHERE [SmallArea]="NA";"

I try to find any record in SmallArea that contain "NA", it give me the compile error of "expected: end of statement"

Can anyone fix it for me? Thanks!​
 
Try
Code:
Sql1 ="Select [SmallArea] From [AreaQuery1] WHERE [SmallArea]=[COLOR="Red"][B]'[/B][/COLOR]NA[COLOR="Red"][B]'[/B][/COLOR];"
 
Got it! Thank you!

Try
Code:
Sql1 ="Select [SmallArea] From [AreaQuery1] WHERE [SmallArea]=[COLOR=red][B]'[/B][/COLOR]NA[COLOR=red][B]'[/B][/COLOR];"
 

Users who are viewing this thread

Back
Top Bottom