January 11, 2010

Trick to Create a Custom function Shortcut in MS Acess

To run certain custom functions in MS Acess, we have to follow very lenthy steps & there is no inbuilt shortcut in shortcut menubar. So by this trick we can create new shortcut in shortcut menubar.

This trick suggest:

1.How to add a command to that menu that calls your Custom Function.
2.How to place your own custom command on the Shortcut Menu where you can access it easily.

Step1 :Open your database. Right click on the toolbar. Select “Customize . . .” A Dialog window appears. Click on the “Toolbars” tab. Next, click the “Shortcut Menus” checkbox. A long bar of Shortcut menu bar should appear:

Step2. On the dialog box select the “Commands” tab. Click on “File”. In the window click on “Custom” and drag it to the Shortcut Menu Bar. Drag it to “Report” then “Print Preview” and drop it where you want it to be in the menu that appears.

Step3.Right-click on the “Custom” menu item you just placed. A dialog box opens. In the “Name” box type in the command name you want the user to see in the Shortcut Menu. For Example, Save As Snapshot, or Save Snapshot, etc.

Step4.Next go to the bottom of the dialog box and click on “Properties”. A Dialog window pops up. In the “On Action” box enter the command to run your function like this: =MyFunctionName()

Click “Close” and Click “Close” again and now  you are ready to try your new shortcut menu command.
You can also add a command to the Form Shortcut menu. Just drag the “Custom” menu item to “Form” on the Shortcut Menu Bar and drop it in the “Form View Title Bar” Menu. Now you can launch your Custom Functions from the shortcut menu.

Finally Access stores the data about your customized Shortcut Bar Command in the Registry so it is available any time you use an Access Database on that computer.

I think it helps to run your custom functions from shortcut.

No comments:

Post a Comment