This article describes how you can create two types of shortcuts on theWindows 95 or later desktop, both of which start an Access database andopen to a form of your choosing. You can create such a shortcut either bydragging the form from the Database window to the desktop or by using the/cmd command-line switch.
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.
NOTE: These shortcuts assume that Microsoft Access is installed in the C:\Program Files\Microsoft Office\Office\ folder.
Open the sample database Northwind.mdb and create the following functionin a new module:
Function CheckCommandLine() ' Check value returned by Command function. If Command = "Orders" Then DoCmd.OpenForm "Orders" ElseIf Command = "Employees" Then DoCmd.OpenForm "Employees" Else Exit Function End If End Function
Create a new macro as follows and save it as AutoExec: