Add Parameters to MAF Shortcut

Kodash

Registered User.
Local time
Today, 12:37
Joined
Feb 26, 2014
Messages
22
Hi Guys,

Is there any way to add parameters to a .maf shortcut?

I'm thinking, I may be able to email the link to a form to someone, with the correct ID. But I'm assuming this isn't an easy thing to do?
 
It's a Microsoft Access Form shortcut file

When you drag a form to the windows desktop and that's the file extension it's given.
 
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.
 
Why not create a shortcut to open the db and have the form setup as the Startup Form?
 
The startup form is a navigation form for all the categories. I'm thinking a better path may be generating some command line switches
 
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.
 
No, the plan was Navigation for general use, and the link as just a one off project, I building on what I found here: https://support.microsoft.com/en-us/kb/177475

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
 
The only parameters that are contained in an MAF are as follows:

AccessShortcutVersion
DatabaseName
ObjectName
ObjectType
Computer
DatabasePath
EnableRemote
CreationTime
Icon

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.
 
Or create a form that goes to that record and then create a shortcut of the form.
 
Hi Guys,

Is there any way to add parameters to a .maf shortcut?

I'm thinking, I may be able to email the link to a form to someone, with the correct ID. But I'm assuming this isn't an easy thing to do?

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
 

Users who are viewing this thread

Back
Top Bottom