passing variable to application

MikeHP

New member
Local time
Today, 06:56
Joined
Jul 9, 2008
Messages
7
Hi Everyone

I'm trying to pass information from the current record to the startup line of an application. Specifically I am trying to pass the current record name so that the application will open in the correct directory.

Any help would be appreciated

Thanks
Mike
 
It all depends on what the application as to whether it accepts command line parameters. What application is it? What is it built in? Does it accept command line parameters?
 
The application is FastStone Image Viewer, I beleive that it does accept command line parameters, I do not know what it is written in.

Thanks
 
You probably are going to need to get their help to get the right command line parameter but you normally can use Shell to open something and pass parameters or switches:

Shell("C:\Program Files\YourProgramFolder\YourProgram.exe /" & Me.YourSwitch)

You might have to build the string first:

Dim strShell As String
strShell = "C:\Program Files\YourProgramFolder\YourProgram.exe /" & Me.YourSwitch
Shell(strShell)

But something like that but the syntax really depends on what switches and parameters it accepts, which you would need to gather from them.
 
Thanks for the help Bob, I think I see how to do what I want, but how do you tell it specifically in the string to use a particular field in that string. Sorry if I'm not being clear but VBA programming is rather confusing to me.

Thanks
 
The Me.YourSwitch is how you send it. Replace the 'YourSwitch' with the textbox control name on the form...
 

Users who are viewing this thread

Back
Top Bottom