Hi Evertyone.
I have used this code on many forms without a problem
Option Compare Database
Option Explicit
Dim Data As Recordset
Various Code.....
Set Data = CurrentDb.OpenRecordset("tblMain", , dbPessimistic)
With Data
.AddNew
Various bits of code
On the new form I am getting Compile error variable not defined and the dbPessimistic is highlighted
Can anyone point me in the right direction as to what is causing this?
Thanks
CNEIL
I have used this code on many forms without a problem
Option Compare Database
Option Explicit
Dim Data As Recordset
Various Code.....
Set Data = CurrentDb.OpenRecordset("tblMain", , dbPessimistic)
With Data
.AddNew
Various bits of code
On the new form I am getting Compile error variable not defined and the dbPessimistic is highlighted
Can anyone point me in the right direction as to what is causing this?
Thanks
CNEIL