"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 "New Record Added"
End If
rs.Close
db.Close
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 "New Record Added"
End If
rs.Close
db.Close