Introduction - MS-Access 2003.
We have learned how to create Menus and Toolbars through Toolbars - ->Customize options, in earlier Posts. If you would like to have a second look at them, then the links are given below:
- Calendar and Toolbars - Access 2003
- Custom Menus and Toolbars - Access 2003
- Custom Menus and Toolbars-2 - Access 2003
- Inputbox and Simple Manus
There are other methods to create simple custom menus for Forms/Reports and use them with your Applications. We are going to learn how to create a Shortcut Menu with Macros and attach it to a Form.
Sample Demo Run.
Select the Macro Tab on the Objects pane.
Click New to open a new Macro in Design View.
If the Macro Name Column is not visible, then click on the Macro-Name Toolbar Button (with xyz label) to display the Macro Name Column.
Type Clo&se under the Macro Name column in the first row.
Select Close from the drop-down list of Action.
Type &Preview in the second row under Macro Name.
Under Action select the OpenReport option from the drop-down list.
In the Property Sheet under Action Arguments select a Report from your list of Reports (I have selected Employees in the sample image given above) in the Report Name Property.
Select Print Preview in the View Property.
Type &Form in the third row under the Macro Name column.
Select Open Form in the Action Column.
Select an existing Form's name from the Form Name Property drop-down list.
Select the Form in the View property.
Type a dash (-) character in the next row under the Macro Name column.
Type &GotoNext in the fifth row under the Macro Name column.
Select GotoRecord in the Action Column.
Type &Minimize in the sixth row under Macro Name.
Select Minimize from the drop-down list in Action Column.
Save the Macro with the name mcrShortCut and close it.
You can add as many commands or actions like opening Queries or for running Programs can be added to your menu for the convenience of your Application Users.
Defining Macro as Menu.
Our work on the Macro Menu is complete, but a little more work is left to define the Macro as a Menu.
Open a new macro in the design view.
Select AddMenu from the drop-down list in Action Column.
Leave the Menu Name Property Blank. This is used for Group Menu Names when you have group Menus with different sets of actions. In this case, this Macro will have more than one AddMenu Action line with a different set of Menu Macros.
Select mcrShortCut in the Menu Macro Name Property.
Save the macro with the name mcrShortCutMenu.
Open one of your Forms in Design View (don't open the form that you have used in the OpenForm action in the first macro).
Display the Form's Property Sheet (View - ->Properties).
Set the following Property Values of the Form as given below:
- Shortcut Menu = Yes
- Shortcut Menu Bar = mcrShortCutMenu
Save the Form.
Open the Form in a normal view.
Right-Click on the Form to display the Shortcut Menu. See the sample image given below:
Try out the options displayed in the Shortcut Menu.
We can not only create Shortcut Menus but also Toolbars and Menu Bars too. This we will learn Next.
- Change Secure DB to Unsecured - Access 2003
- Date and Time Values
- Limit to List Combo Box
- Input Masks and Data Entry
- Menus with Options Group Control
[...] plant species in the same area and make many vegetables and fruit grown together | Fresh News LEARN MS-ACCESS TIPS AND TRICKS - Create Menus with Macros Graphic Design Projects – 890th Edition « Freelance Graphic Design Projects « [...]
ReplyDelete