Running a Query in VB within Access

Sharky Forums


Results 1 to 7 of 7

Thread: Running a Query in VB within Access

Hybrid View

  1. #1
    Catfish webraycer's Avatar
    Join Date
    Dec 2001
    Location
    Midlothian, VA, USA
    Posts
    187
    Thanks -- but my rstRS.Open line is still broken with the same error.

  2. #2
    Catfish webraycer's Avatar
    Join Date
    Dec 2001
    Location
    Midlothian, VA, USA
    Posts
    187
    It works now -- I forgot to put single quotes around a value in the query -- I had "WHERE name=targetname" instead of "WHERE name='targetname'"

    Why that gave me the error I got I have no idea -- most programming languages give a query syntax error.

  3. #3
    Mako Shark Paladyr's Avatar
    Join Date
    Mar 2001
    Location
    Cinci, OH
    Posts
    4,562
    Quote Originally Posted by webraycer
    It works now -- I forgot to put single quotes around a value in the query -- I had "WHERE name=targetname" instead of "WHERE name='targetname'"

    Why that gave me the error I got I have no idea -- most programming languages give a query syntax error.
    when you are opening recordsets, you will only get errors that the recordset can generate, rather than an error about interpreting the SQL statement. Glad it works!
    Core 2 Duo w Radeon 4850, Droid Phone, Mits HD1000U projector

Posting Permissions

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