There may be an easier way to do it (or it may not be doable). My Goal is to have a button on a form, that sends an email via outlook (or Lotus Notes in an ideal world) with the record ID of the form, so the recipient just clicks the link and the DB opens the form on the correct record.
You're going to end up complicating matters. You may end up with 10 forms that need to be opened, and in that case would you go and create 10 shortcuts? Your users should open the db and from the navigation form create a button that opens the form.
Where the /cmd would be "3" for example. Then Autoexec opens the form where [ID] = 3
So a button that sends the mail on the form can throw together the /cmd switch
So as you can see none of them allow you to pass parameters.
The same way a parameter is passed via a normal shortcut is the same way that you would action what should happen next when the navigation form loads with that parameter/command. So in your navigation form's load event, here's some pseudocode:
Code:
With VBA.Interaction
If .Command <> vbNullString Then
DoCmd.OpenForm "FormName",,,"ID = " & CLng(.Command)
End If
End With
Your navigation form is the command centre, so everything should be centred around it.
Brilliant Idea. Did you ever figure this out? I did some testing and found that DatabaseName=..\ works FYI if you want to put your MAF's in a sub-folder from your MDB files