troubleshooting Question

SQL DB Error on Setting Form recordset in Access

Avatar of VeeVan
VeeVan asked on
Microsoft SQL ServerMicrosoft Access
3 Comments1 Solution242 ViewsLast Modified:
I have a challenge with an Access program. I have a SQL backend, and I have one form (just one) that is causing an error:

    Dim strLogon As String
    Dim strSQL As String
    Dim rstRS As Recordset
   
    strLogon = Me!Logon
    strSQL = "SELECT * FROM tblUsers ORDER BY UserInitials"
   
    Me.RecordSource = strSQL
    Set rstRS = Me.Recordset.Clone
    rstRS.FindFirst "[Logon] = '" & strLogon & "'"
    Me.Bookmark = rstRS.Bookmark
       
    DoCmd.GotoRecord acActiveDataObject, , acNext
    Me.AllowAdditions = False
    Me.AllowEdits = False
   
    Form_Refresh

The line that causes the error is here:

    Me.RecordSource = strSQL

I get an error about using dbSeeChanges when using OpenRecordset in a table that has an identity column. Now the REALLY weird part is that my table doesn't HAVE an identitiy column. I am totally unsure of what is causing this issue.

The error is coming from SQL, and then it proceeds with all my other code.

Any help would be greatly appreciated.

Thanks.
Vee
ASKER CERTIFIED SOLUTION
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 3 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 3 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004