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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need my data base to notify me

Status
Not open for further replies.

warmunger

Technical User
Jul 15, 2002
42
0
0
ZA
"YOU MUST USE THE DBSEECHANGES OPTION WITH OPENRECORDSET WHEN ACCESSING A SQL SERVER TABLE THAT HAS AN IDENTITY COLUMN"

This is the error I get when I'm using the following code
I'am using a sql database

DoCmd.Requery
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("TableName", dbOpenDynaset)
rs.MoveLast
If vTableRecordCount <> rs.RecordCount Then
vTableRecordCount = rs.RecordCount
MsgBox &quot;New Record Added&quot;
End If
rs.Close
db.Close



 
Try this:

Set rs = db.OpenRecordset(&quot;TableName&quot;, dbOpenDynaset + dbseechanges)
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
When I add this code it tells me that it is a invalid argument.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top