What Character?

M

Mr. JYC

Hello,

When I am generating a SQL statement to be used in programming, what
character should I use for " for instance,

select stores from mall where stores like "Sears*";

I am trying to build a string from the above statement but I don't know what
to use for the " character.

So, the statement would look like

str = "select stores from mall where stores like" & Sears*

but I am stuck with what to use for what to put around Sears* so that the
SQL statement would execute properly.

Please help.
 
T

tina

"SELECT stores FROM mall WHERE stores LIKE 'Sears*'"

if you're referring to a control on a form, rather than a hard-coded value,
the syntax would be

"SELECT stores FROM mall WHERE stores LIKE '" _
& Me!ControlName & "*'"

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top