I am not sure why my code is not working. I want to added the data to my table if the data does not exist in the table yet. Any help would be approached.
Thank You,
rjoshi2
here is my code:
Private Sub Object_Class_Description_AfterUpdate()
Dim sSQL As String
If Not Me.Object_Class = DLookup("[strClass]", "[tblObjClsDesc]"
Then
sSQL = "INSERT INTO tblObjClsDesc (strClass, strDescription) VALUES (Me.Object_Class, Me.Object_Class_Description)"
CurrentDb.Execute sSQL, dbFailOnError
End If
End Sub
Thank You,
rjoshi2
here is my code:
Private Sub Object_Class_Description_AfterUpdate()
Dim sSQL As String
If Not Me.Object_Class = DLookup("[strClass]", "[tblObjClsDesc]"
sSQL = "INSERT INTO tblObjClsDesc (strClass, strDescription) VALUES (Me.Object_Class, Me.Object_Class_Description)"
CurrentDb.Execute sSQL, dbFailOnError
End If
End Sub