Results 1 to 2 of 2
  1. #1
    lringstad is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    1

    dbSeeChanges does not fix openrecordset error

    I have read all the threads about using the dbseechanges option on the openrecordset command but have not been able to get it to work under all situations.

    my line that is erroring is

    set rs = db.openrecordset(SQLSTMT, , dbseechanges)

    table being accessed is a table linked to a SQL 2012 table with the identity column as the primary key.

    table is
    Field1
    IdentityField
    Field3


    the first SQLSTMT was "Select * from Table where Field1 = " & variable1



    even with the dbseechanges option I still get a 3622 error

    then I tried "Select Field1,Field3 from table where Field1 = " & Variable1

    this statement worked fine. and since I didn't need to have the value of the Identityfield I was good to go.

    BUT I wanted to know how to do it if I needed the value of the Identify Column.

    I tried "Select field1, indentityField, field3 from table where Field1 = " & Variable1

    and once again I got the 3622 error.


    Does anyone know how to make this work with the identify column.

    thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the description for the 3622 error? The lack of capitalization in your code hints that Access isn't recognizing something. Mine looks like:

    Set rs = db.OpenRecordset(strSql, dbOpenDynaset, dbSeeChanges)

    How is rs declared?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 07-24-2013, 02:01 PM
  2. Use dbseechanges option with openrecordset
    By spleewars in forum Programming
    Replies: 3
    Last Post: 05-22-2012, 04:19 PM
  3. Filtering OpenRecordset Form reference error
    By CaptainKen in forum Programming
    Replies: 3
    Last Post: 02-09-2012, 06:11 PM
  4. db.OpenRecordset error
    By jscriptor09 in forum Programming
    Replies: 4
    Last Post: 01-27-2012, 12:17 AM
  5. dbSeeChanges
    By swagger18 in forum Programming
    Replies: 3
    Last Post: 11-23-2011, 08:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums