Closing opening menu after selection made.

Charlie

Board Regular
Joined
Mar 1, 2002
Messages
134
Hello,
I have created a database in Access 2002 which on opening starts up a menu form containing buttons linking to the other forms in the database.

I have a macro setup on each form to maximize the size on opening, my problem is I want the previous form the menu to close when the menu item is selected upon the clicking of the relevant selection button.

I would also like the menu to re-open on the closing of the selected menu item.

How can this be achieved?


Cheers Charlie
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Write a function or sub and then call that in the on-click event of every button that opens a form:

Code:
Command1_OnClick()
'Code to open another form here
Call Close_Function
End Sub

Command2_OnClick()
'Code to open another form here
Call Close_Function
End Sub

Command3_OnClick()
'Code to open another form here
Call Close_Function
End Sub


Public Function Close_Function
Docmd.Close acForm, "Your_Form_To_Close"
End Function
 
Upvote 0
Thanks Mate,
That's half of it working now, how do I get the menu to reappear on the closing of the form?


Charlie


Ahh sussed it...Thanks again.
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,199
Members
451,688
Latest member
Gregs44132

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top