Docmd.RunSQL("select * from award where name = ""Children's book award""")change " to ""

解决方案 »

  1.   

    thanks by the answer is not ok
    the compiler reported that the runsql command needs an argument consisting of an sql statement!!
    any idea??
      

  2.   

    Docmd.RunSQL("select * from award where name = 'Children's book award'")
      

  3.   

    thanks but still error!!
    it reports : syntax error(missing operator) in query expression 
    'name = 'Children's book award".
      

  4.   

    Pls read it carefully once again:name = 'Children's book award'Use '
    not "
    nor any other operatorAnd read through the following once again:it reports : syntax error(missing operator) in query expression 
    'name = 'Children's book award".
                                 ~~~You've missed sth.,I guess!
      

  5.   

    Sorry!it reports : syntax error(missing operator) in query expression 
    'name = 'Children's book award".
    you have a ' in your sql string.
    use \' to replace it.
      

  6.   

    i have read it carefully!
    i wrote: 
    DoCmd.RunSQL ("select * from award where name = 'Children's book award'")and the compiler report that :
    syntax error(missing operator) in query expression 
    'name = 'Children's book award".it is a strange problem and pls help me!!!
      

  7.   

    the '\' isn't help!
    the error becomes syntax error(missing operator) in query expression 
    'name = 'Children\'s book award".
      

  8.   

    Can anyone help!!
    it is really urgent
    without solving this problem i can;t proceed to the next stage!!Pls help!
      

  9.   

    Try:
    name = 'Children''s book award'.
                    ~~~
    Use '' to replace '
    See it.....ok?
      

  10.   

    i have tried this before, it works ok on sql server
    but the VBA in Access reported this statement is not a SQL statement which can be executed using Docmd.RunSQL.Pls any more suggestions??