HockeyNut
Tureco Del Hockey
- Local time
- Today, 10:52
- Joined
- Feb 25, 2003
- Messages
- 62
Error Trapping (probably for dummies)
Hi everyone,
I've been toiling with error trapping, having never used it before, and am struggling.
I think I'm missing something fundatmental and would like if anyone could look at my code to point out the (probably glaring to you) problem.
I've had a good look through lots of code on here as well as searching for information on it here. One post recommended looking under "error handling in run-time applications" in MS Access Help, but this give nothing for me.
I want it to come up with my error message, not the Access default error about "not in list".
At the moment it bring up my error msgbox, and then the access default one.
Here is my code, can anyone please advise?
------------------------------------------------------------------------------------------------
Private Sub cboTitle_NotInList(NewData As String, Response As Integer)
Call InvalidComboSelection
End Sub
------------------------------------------------------------------------------------------------
Private Sub InvalidComboSelection()
MsgBox "Please choose a valid option from the list provided", vbOKOnly, "Invalid selection"
'MsgBox "Put your message in here", msgbox type here, "msgbox title here"
End Sub
------------------------------------------------------------------------------------------------
Hi everyone,
I've been toiling with error trapping, having never used it before, and am struggling.
I think I'm missing something fundatmental and would like if anyone could look at my code to point out the (probably glaring to you) problem.
I've had a good look through lots of code on here as well as searching for information on it here. One post recommended looking under "error handling in run-time applications" in MS Access Help, but this give nothing for me.
I want it to come up with my error message, not the Access default error about "not in list".
At the moment it bring up my error msgbox, and then the access default one.
Here is my code, can anyone please advise?
------------------------------------------------------------------------------------------------
Private Sub cboTitle_NotInList(NewData As String, Response As Integer)
Call InvalidComboSelection
End Sub
------------------------------------------------------------------------------------------------
Private Sub InvalidComboSelection()
MsgBox "Please choose a valid option from the list provided", vbOKOnly, "Invalid selection"
'MsgBox "Put your message in here", msgbox type here, "msgbox title here"
End Sub
------------------------------------------------------------------------------------------------