Cybernetic2002
Programmer
The following is code I used in a previous Access 97 app to add a new record to a table. When I put this code into my Access 2000 app it fails with the error: "Compile error: User defined type not defined".
Anyway here is my 97 code, if anyone could translate this into 2000 code or knows a better way of doing this the help would be a appreciated.
Dim dbs As Database, rst As Recordset
Dim fldContactID As Field, fldAttention As Field
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Attention"
Set fldContactID = [rst!ContactID]
Set fldAttention = [rst!Attention]
With rst
.AddNew
!ContactID = cboContact
!Attention = NewData
.Update
End With
rst.Close
Thanks in advance.
Steve
Anyway here is my 97 code, if anyone could translate this into 2000 code or knows a better way of doing this the help would be a appreciated.
Dim dbs As Database, rst As Recordset
Dim fldContactID As Field, fldAttention As Field
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Attention"
Set fldContactID = [rst!ContactID]
Set fldAttention = [rst!Attention]
With rst
.AddNew
!ContactID = cboContact
!Attention = NewData
.Update
End With
rst.Close
Thanks in advance.
Steve