How to disable @ parsing?

  • Thread starter Thread starter Stephan_Cz
  • Start date Start date
S

Stephan_Cz

Hi there,

when using MyForm.recordsource="SELECT * FROM products WHERE
prodcode='Screws@8' "

I get a message box asking for "Input parameter value 8". How can I disable
the parsing of the @ symbol to allow searching for fields with the embedded @
symbol?

Any idea would help

Stephan
 
Have you tried putting the @ symbol in brackets?
prodcode='Screws[@]8'
You'll have to check fo the @ symbol before you formulate the string:
If InStr([Field],"@")>0 then...
Replace([Field],"@","[@]")
 
Hi kingston

yes, I've tried brackets, yet it does not help. Instead the right bracket
becomes part of the question:

Input parameter value ]8

Cheers

Stephan
 
Try creating a string variable:

strVar = "Screws@8"

Then create the SQL string:

"SELECT * FROM products WHERE prodcode='" & strVar & "'"


Stephan_Cz said:
Hi kingston

yes, I've tried brackets, yet it does not help. Instead the right bracket
becomes part of the question:

Input parameter value ]8

Cheers

Stephan
 
Stephan_Cz said:
Hi there,

when using MyForm.recordsource="SELECT * FROM products WHERE
prodcode='Screws@8' "

I get a message box asking for "Input parameter value 8". How can I
disable the parsing of the @ symbol to allow searching for fields
with the embedded @ symbol?

I'm guessing this is an ADP problem, and I don't have one handy to test.
But would it work if you wrote this:

MyForm.recordsource = _
"SELECT * FROM products WHERE prodcode='Screws'+'@'+'8' "

?
 

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

Back
Top