dbSeeChanges Error with SQL Back End

CPGDeveloper

Board Regular
Joined
Oct 8, 2008
Messages
122
Hi All~

I'm trying to create a recordset in VBA using a SQL linked table and am getting Error 3622 - "You must use dbChanges with the OpenRecordset...."

I tried to add that option but it seems to not make a difference. I have something like this --

Dim usql as string
Dim urs as DAO.Recordset

usql = "SELECT * FROM tbl1 WHERE tbl1.ID = 1;"
Set urs = CurrentDb.OpenRecordset(usql, , dbSeeChanges)

With or without the dbSeeChanges I'm still getting the error -- any help would be greatly appreciated. Thanks!
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,392
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Does it help if you use:

Code:
Set urs = CurrentDb.OpenRecordset(usql, dbOpenDynaset, dbSeeChanges)
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,392
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Glad to help. :)
 

Forum statistics

Threads
1,082,723
Messages
5,367,183
Members
400,947
Latest member
royroy

Some videos you may like

This Week's Hot Topics

Top