Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Rid of Default Error Messages

Status
Not open for further replies.

DanaPach

MIS
Mar 17, 2004
14
0
0
US
I have written an event procedure for 'On Not In List' for a Combo Box - to bring up an error message that I wrote. However, once they click ok on my error message, Access brings up it's own error message right after mine. How can I stop it from doing this?? Any help would be greatly appreciate. I have set the docmd.setwarning to False already and it is not preventing the access error message.
 
Hi!

Put the line:

[tt]Response=acDataErrContinue[/tt]

within your not in list code.

Roy-Vidar
 
How are ya DanaPach . . . . .

Here's the full context of using the [blue]Response[/blue] variable with messagebox:
Code:
[blue]If MsgBox("Add To List?") =vbYes then
   'Your Code To Add To List
   [purple]Response[/purple]=acDataErrAdded
Else
   'Return to ComboBox
   [purple]Response[/purple]=acDataErrContinue
End If[/blue]


cal.gif
See Ya! . . . . . .
 
Thank you for your help on this. The acDataErrContinue worked great.
Thanks again
 
Thank you for your help. It worked great. I appricate your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top