Help need with custom Message Box.

  • Thread starter Thread starter Terry DeJournett
  • Start date Start date
T

Terry DeJournett

I have a form with a command button on it that when pushed would bring up a
MsgBox asking if user wants to print records or not. Instead of using the
builtin message box, I want to design my own (MUCH LARGER) and have two
buttons on it "Yes" and "No".

I can get the custom created form to open in dialog mode and have two button
it. If I select yes, I have code set to close the form and continue with
the scripts that I have written from the original form. But what I can not
figure out is how to code the No button to stop everything and not run the
original code and instead return to the original "Main Menu" form.

Any help or guidance would be very much appreciated.

Terry
 
Hi Terry,

Move the code from the original form to the appropriate button on the
confirmation form. Basically, the Yes button gets the print and whatnot, and
the No button simply closes the confirmation form.
 
THANK YOU, THANK YOU, THANK YOU. So easy, yet I've battled with this for
three days and couldn't see this. You have made my day. Bless You.

Terry
 
Glad to help anytime

;-)

SusanV

Terry DeJournett said:
THANK YOU, THANK YOU, THANK YOU. So easy, yet I've battled with this for
three days and couldn't see this. You have made my day. Bless You.

Terry
 
What not have your custom form *return* a value.

If you move the code to that custom form, then it can be only used ONE time,
and for that ONE purpose.

Next think you know, you have 10 copies of the same form yes/no + code to
run.

I explain in detail here how to use a form to RETURN values to the calling
code.
The example also halts the calling code (just like the msgbox would).
The example also allows you to return values, and NOT use global variables.

I explain here:

http://www.members.shaw.ca/AlbertKallal/Dialog/Index.html

Do the above,and you don't have to move your code to the yes/no form...and
it don't belong there anyway...
 
Back
Top