Solved Run-time error '3622' (1 Viewer)

Ashfaque

Student
Local time
Tomorrow, 05:18
Joined
Sep 6, 2004
Messages
894
Good Morning,

After opening my form when I tried to get the record to display, it produced following msg. This form has subform also which is apparently not working but that could be later on.
"You must use the dbSeeChanges option with OpenRecordset when accessing a sql server table that has an IDENTITY column"
and debugged on following main form code that placed on a combo to get record.

Set rst = CurrentDb.OpenRecordset("Select * from T_ProjectBaseContracts where ProjNum='" & CboSearchProj & "'")

Do anyone have idea about this and what is solution?

Can someone please help?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:48
Joined
May 7, 2009
Messages
19,169
just add what it is asking:

Set rst = CurrentDb.OpenRecordset("Select * from T_ProjectBaseContracts where ProjNum='" & CboSearchProj & "'", dbSeeChanges)
 

Ashfaque

Student
Local time
Tomorrow, 05:18
Joined
Sep 6, 2004
Messages
894
just add what it is asking:

Set rst = CurrentDb.OpenRecordset("Select * from T_ProjectBaseContracts where ProjNum='" & CboSearchProj & "'", dbSeeChanges)
Thats excellent....Thanks Arnel for quick support.....
 

Isaac

Lifelong Learner
Local time
Today, 16:48
Joined
Mar 14, 2017
Messages
8,738
I usually use dynaset + dbSeeChanges, but it depends on what you're going to do with the recordset i suppose
 

Users who are viewing this thread

Top Bottom