I have used the same On Not in List in 2 databases, no problems.
Start the 3rd one today, it is structured the same way...but I get the message:
The expression On Not in List you entered as the event property setting produced the following error: Object or class does not support the set of events.
**********************************************************
Private Sub Career_Title_NotInList(NewData As String, Response As Integer)
Dim db As DAO.Database, rst As DAO.Recordset
Dim Msg As String, Style As Integer, Title As String, DL As String
DL = vbNewLine & vbNewLine
Msg = "'" & NewData & "' is not an available item " & DL & _
"Do you want to add this item to the current list? " & DL & _
"Click Yes To Add " & NewData & " to the list" & DL & _
"Click No to re-type it."
Style = vbQuestion + vbYesNo
Title = "Add New Item?"
If MsgBox(Msg, Style, Title) = vbNo Then
Me![Career Title].Undo
Response = acDataErrContinue
Else
Set db = CurrentDb
Set rst = db.OpenRecordset("TblCareerTitle", dbOpenDynaset)
rst.AddNew
rst![Career Title] = NewData
rst.Update
Response = acDataErrAdded
End If
Set rst = Nothing
Set db = Nothing
End Sub
**********************************************************
The form goes directly back to the WorkerID table which has a Career Title field that is populated by TblCareerTitle.
It is just not clicking what I am doing or not doing?
Thanks so much!~