?
Solved

Message Box With 3 options

Posted on 2009-04-29
2
Medium Priority
?
518 Views
Last Modified: 2012-05-06
there is a "Save" button on "form A". When I click it, I want it to pop up a message box with 3 buttons:

Button1 -- Open form1 in new data entry mode
Button2 -- Open form2 in normal
Button3 -- Save and close "form A"

Thanks
0
Comment
Question by:lysenko
2 Comments
 
LVL 11

Accepted Solution

by:
SeanStrickland earned 1000 total points
ID: 24263109
I would create a separate form for this and set the Pop Up property of the form to "Yes".

The On_Click behind the "Save" button on Form A would be

Private Sub cmdSave_Click()
docmd.openform "frmSave"
End Sub

Now in frmSave (the Pop-up form), you can create three buttons.  The first button (cmdNew) would have an On_Click event of:

Private Sub cmdNew_Click()
DoCmd.OpenForm "formB", , , , acFormAdd
Docmd.Close acForm, Me.Name
End Sub

The second button (cmdNormal) would have an On_Click event of:

Private Sub cmdNew_Click()
DoCmd.OpenForm "formB"
Docmd.Close acForm, Me.Name
End Sub

and the third button (cmdSaveAndClose) would have an On_Click event of:

Private Sub cmdSaveAndClose_Click()
Forms![Form A].Dirty = False
Docmd.Close acForm, Me.Name
End Sub


Now put a label above the three buttons for a little message to the user and you're good to go.
0
 
LVL 1

Expert Comment

by:mcfitz13
ID: 24342070
I agree or you could  use an input box and prompt for values.

Enter 1 for Open form1 in new data entry mode
Enter 2 for Button2 -- Open form2 in normal
Enter 3 for Button3 -- Save and close "form A"
else
 do nothing

Make sense? It'll save you from creating a form
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question