Question:

AccessDB Help???????

by  |  earlier

0 LIKES UnLike

Having a error message come up with on of our clients using AccessDB

error -2147217900: syntax error (missing operator) in query expression 'custcompanyname='LABORATOIRES PHYT'S PRODUCTIONS''.

Has anyone any ideas why this is happening?

Thanks

 Tags:

   Report

3 ANSWERS


  1. Your SQL statement should read

    custcompanyname='LABORATOIRES PHYT''S PRODUCTIONS'

    You get that by making sure, in your code, that any ' gets replaced by '' (two single quotes).  Use the Replace() function:

    <your variable> = Replace(<your variable>, "'", "''")

    That's double quote single quote double quote, double quote single quote single quote double quote

    You should do that for all character-type variables.  And delimit the string by single quotes OR double quotes, but make the start and end delimiters the same.


  2. it says write there.. Syntax Error.

    'custcompanyname' = "LABORATORIES PHYTS PRODUCTIONS" should fix the problem.

    See how the = sign is attached to the column name on the left? I think thats whats messing it up. Also, make sure you have the right number of double quotes and single quotes.

  3. Looks like you're mixing single and double quotes.
You're reading: AccessDB Help???????

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions