Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbseechanges option with openrecordset 2

Status
Not open for further replies.

lars7

Technical User
Aug 16, 2005
817
GB
Hi,


Tried this on the server forum and they told me it was an access question.

This code worked fine until I uploaded the tables to the server.

Can anyone see why I am getting this error message:

"You must use the dbseechanges option with openrecordset when accessing a sql server table that has an identity collumn"

with this:

'strSQL = "UPDATE tblRecords SET tblRecords.HRAdviser = '" & [Forms]![FormMain].[Form]![FormSubMainRecords]![TextUserName] & "'" & _
'"WHERE tblRecords.HRAdviser Is Null AND tblRecords.RecId=" & [Forms]![FormMain].[Form]![FormSubMainRecords]![RecId]

'CurrentDb.Execute strSQL, dbFailOnError
 
I had to do the same thing when I upgraded to an SQL Server backend.

Just add the dbSeeChanges argument and it should be fine.

 
Hi Joe,

Thanks but how do I do that?
 
Try...
Code:
CurrentDb.Execute strSQL, dbFailOnError + dbSeeChanges
 
Thanks Spenney,

That worked great.
 
Sometimes I wonder if people's F1 keys are permanently broken...


 
Hi Joe,

I looked up microsofts site and other forums but could not work out what you ment (this ones search was not available at the time) sometimes I can't see the woods for the trees [bigglasses] but I can see now you deserved a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top