Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106

    Unanswered: Run time error '3131'

    Hi I have this piece of code in an access module

    SqlStr = "SELECT * FROM order WHERE order_id = inOrderId "

    Set rst = CurrentDb.OpenRecordset(SqlStr, dbOpenDynaset)

    I am getting (Setax error in FROM clause) error and it stops on the SET line.

    the inOrderId is defined as an Integer. It looks like it is not coded right.

    please help

    Thanks
    Mo

  2. #2
    Join Date
    Feb 2003
    Location
    USA
    Posts
    18
    This is becoz your tablename "order" is a keyword. You can try
    select * from [order] where ......
    or rename your table
    Good Luck!

  3. #3
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106
    Thanks a lot,

    That was it, how stupid of me.
    Mo

  4. #4
    Join Date
    Feb 2003
    Location
    USA
    Posts
    18
    You are welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •