The VBA code behind the "SupplierID > 5 and CompanyName starts with S" button is: Private Sub cmdComplex_Click() 'Filter report to display only Supplier currently showing on frmExampleĭoCmd.OpenReport "rptSuppliers", acViewPreview,, "SupplierID = " & SupplierID The VBA code behind the "Current Supplier only" button is: Private Sub cmdCurrent_Click() The following example creates a shortcut menu named SimpleShortcutMenu.
'Display all suppliers in rptSuppliers reportĭoCmd.OpenReport "rptSuppliers", acViewPreview In Access 2013, you must use Visual Basic for Applications (VBA) code to create a. The VBA code behind the "All Suppliers" button is: Private Sub cmdAll_Click()
#Ms access menu examples how to#
Wow, have things changed Wow, have things changed Ive read lots of documentation on CommandBar and CommandBarControls, but I havent found a clear example of how to build a CommandBar with Controls that perform these two operations-opening a form and executing code.