Results 1 to 2 of 2
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cannot Open Table Using VBA (2003)

    The button labelled "Meter readings" on the startup form of the attached mdb is supposed to open the READING form but, when I click it, code stops at the line
    <font color=448800>rst.Open "Read", cnn, adOpenKeyset, adLockOptimistic</font color=448800>
    with the message:
    <font color=red>"Invalid SQL Statement. Expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT' or 'UPDATE'.</font color=red>
    The Read table seems a normal table to me, so why the message?

  2. #2
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cannot Open Table Using VBA (2003)

    Solved it. "Read" is a reserved word. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

Posting Permissions

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