Link to home
Start Free TrialLog in
Avatar of wellesleydpw
wellesleydpw

asked on

Shortcut or Hyperlink to Access Form

Is it possible to create a shortcut or hyperlink that opens a database and then opens a specific form?
Avatar of Bill Ross
Bill Ross
Flag of United States of America image

Hi,

You can create a shortcut to the database that will open the database.  You can then open the desired form from within the database automatically in at least 2 ways.

1.  You can set the form as the start up form in the database properties.  
2.  You can create a macro that opens the form and name the macro AutoExec.  This is my preference as you can add additional actions to the macro.

Regards,

Bill
If you want it as an hyperlink you only need to add a link to any website with the relative path to the .mdb file, on clicking the link, the browser will ask user to download or open the file, if the client computer has access installed it will take control of the petition if "open" is selected and the database witll open (following BillDenver answer you'll be able to do your desired form to open by default).
Avatar of Lucian Constantin
Or, a 3rd way for BillDenver suggestions - in the case that his suggestions are not aplicable foe example you want to open another form than the one opened automatically at database open or by "AutoExec":

You could use the MS Access command line switches in that link (for more details see Command-line switches for Access so you could run directly a macro in that database that will open the desired form using this command:

msaccess.exe "c:\MyFolder\MyDatabase.accdb" /x MyOpenFormMacro

The "/x" switch will do the "trick" required to execute directly the macro needed for your "form opening".
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wellesleydpw
wellesleydpw

ASKER

That's exactly what I needed.
I had to quickly look for how to do it in Access 2007 and found it here:
http://office.microsoft.com/en-us/access-help/open-an-existing-database-HA010016347.aspx

Thanks!