troubleshooting Question

SQL DB Error on Setting Form recordset in Access

Avatar of VeeVan
VeeVan asked on
Microsoft AccessMicrosoft SQL Server
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

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.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros