What is wrong with this code?
If the title exists, I get the message box but it doesn't "undo" the text box and adds it to the combo box. I want it to "clear" the contents and not add it to the combo box
Larry
Code:
Private Sub OT_AfterUpdate()
If Me.OT = DLookup("OT", "ObjectiveTitle", Me.OT) Then
MsgBox "This Title already exists, please choose this from the Lookup drop down box", vbOKOnly _
, "Title Already exist"
Me.OT.Undo
Else: Me.cmbLookupTitle.Requery
End If
End Sub
If the title exists, I get the message box but it doesn't "undo" the text box and adds it to the combo box. I want it to "clear" the contents and not add it to the combo box
Larry