D
Double A
I have created a form with an embedded subform that will be used to add/edit
records into 2 tables. One is a table of categories that is used as a look
up table. The other table is a set of steps that are used in a drop down
menu. In my form, I am able to add new records to these tables. However
when I do and click enter or click off the field I am directed to the
following code with an error telling me there is a compile error.
Private Sub Info_After Update
Dim strSQL As String
Dim db As DAO.Database
StrSQL = "tblWorkLineItem"
Set tblWorkLineItem.Info = Me.Category
If Not IsNull (Me.Category) Then
db.Execute strSQL, db FailOnError
End If
Set db = Nothing
End Sub
The error highlights the 3rd line of code "db As DAO.Database"
I did not recall entering this code specifically. Please help me understand
why I am getting this error.
Thanks.
records into 2 tables. One is a table of categories that is used as a look
up table. The other table is a set of steps that are used in a drop down
menu. In my form, I am able to add new records to these tables. However
when I do and click enter or click off the field I am directed to the
following code with an error telling me there is a compile error.
Private Sub Info_After Update
Dim strSQL As String
Dim db As DAO.Database
StrSQL = "tblWorkLineItem"
Set tblWorkLineItem.Info = Me.Category
If Not IsNull (Me.Category) Then
db.Execute strSQL, db FailOnError
End If
Set db = Nothing
End Sub
The error highlights the 3rd line of code "db As DAO.Database"
I did not recall entering this code specifically. Please help me understand
why I am getting this error.
Thanks.