Suppress MsgBox using a checkbox??

themanof83

Registered User.
Local time
Today, 20:33
Joined
May 1, 2008
Messages
73
Hi all,

I am using the standard MsgBox function in VBA and was wondering.....
Is there a way of having a checkbox appear that allows you to suppress the message if it is checked. i.e. sort of like the messages you see in windows (do not show this message again).

I'm sure this could be done with a custom form but it would be far easier not to go down that route..... Thanks in advance.:)
 
the msgboxes appear either becuase you requested them in code, or because there is an error/message of some sort

so

if its the confirmation messages you get when you run queries, then in code put a

docmd.setwarnings false and
docmd.setwarnings true

around a query where you dont want warnings. Bear in mind that if you do, it may only partially complete, and wont report this to you.

if its a program error, then again you can check code before doing whatever you are doing, to try to anticipate/avoid the error, or you can intercept some errors and handle them differently

all depends what you want to do
 
Sorry u miss understand me....

I have coded a msgbox function in VBA that pops up on the click event of a button. I was wondering whether I could put a checkbox in the message box such that next time the button was clicked the message would/would not show depending on selection. Kind of like windows message boxes (do not show this message again).
 
i see - the standard message box comes only with certain preset command buttons

you would either have to design a different form to replace the message box (not too hard), or provide an option external to the msgbox, to suppress it.

say a checkbox, mapped to a field in a constants table, or in the registry, or on a popup, right-click menu. The registry is possible the easiest - sounds hard but its not

look at savesetting and getsetting
 

Users who are viewing this thread

Back
Top Bottom