vbOkayOnly

robart6

Registered User.
Local time
Today, 14:47
Joined
Feb 11, 2004
Messages
19
I want to create a combo box NotInList event procedure that displays a message box that requires the user to click OK. After user clicks OK, the focus will be set to another control on the same form.
 
Code:
Private Sub MyCombo_NotInList()
    MsgBox "Your message.", vbOkOnly
    Me.MyCombo.Undo
    Response = acDataErrContinue
    Me.MyTextBox.SetFocus
End Sub
 
Last edited:
Yes, Mile-O-Phile, I thought that was the answer also. But when the user clicks OK, nothing happens. The whole database freezes; can't close forms, can't switch to design view, can't close the database, can't do anything. Any suggestions, please!
 
What about that? (I changed the code above.)


Why do you need to switch to another textbox? Are you trying to add a new value into the combobox's RowSource?
 
I apologize. Both your solutions work; problem was my database was corrupt. Applied both your solutions to my backup database and they both work. Thank you very much for the help.
 

Users who are viewing this thread

Back
Top Bottom