KevinTekTip
MIS
Can anybody suggest a way for me to click a command button that will pass a string (that uses varibales) to the command line?
On my current Access form I have a command button with the HyperLink property set to "Bptviewer.jar"
When I click this command button Access has no problem running the .jar file as long as it resides in the application path. When this .jar file is run this way, without any command paremeters, it immediately opens an "open file" dialog box forcing the user to select a file to open.
Note: The .jar file is able to accept command paremeters so that at command prompt you can simply type "Bptviewer.jar filename.jpg" and the viewer will open the file immediately without prompting the user to select the file.
Failed Attempt 1:
I have the OnFormLoadproperty set the HyperLink value of a command button to mdbPath & "panos/Bptviewer.jar" and that successfully opens the .jar file. I got excited when that worked so I tried to include the file name variable by changing the HyperLink property to mdbPath & "panos/Bptviewer.jar" & " " & [comboFileName].[ItemData](0) & ".jpg"
The Hyperlink property did not let me include paremeters following the "Bptviewer.jar" and gives me the following error:
Failed Attempt 2:
My next strategy was to use the Shell command in VB. I wrote the following code behind a command button..
Y = mdbPath & "panos/Bptviewer.jar" & " " & [Combo40].[ItemData](0) & ".jpg"
Shell "Y", vbNormalFocus
That also did not work. I've attempted all kinds of syntax with the Shell command and still nothing works. I've searched all over tek-tips, google, and the VB and Access help menus and can still not figure this out. It seems like it shouldn't really be that difficult.
Can anybody suggest a way for me to simply click a command button that will pass a string (that uses varibales) to the command line?
On my current Access form I have a command button with the HyperLink property set to "Bptviewer.jar"
When I click this command button Access has no problem running the .jar file as long as it resides in the application path. When this .jar file is run this way, without any command paremeters, it immediately opens an "open file" dialog box forcing the user to select a file to open.
Note: The .jar file is able to accept command paremeters so that at command prompt you can simply type "Bptviewer.jar filename.jpg" and the viewer will open the file immediately without prompting the user to select the file.
Failed Attempt 1:
I have the OnFormLoadproperty set the HyperLink value of a command button to mdbPath & "panos/Bptviewer.jar" and that successfully opens the .jar file. I got excited when that worked so I tried to include the file name variable by changing the HyperLink property to mdbPath & "panos/Bptviewer.jar" & " " & [comboFileName].[ItemData](0) & ".jpg"
The Hyperlink property did not let me include paremeters following the "Bptviewer.jar" and gives me the following error:

Failed Attempt 2:
My next strategy was to use the Shell command in VB. I wrote the following code behind a command button..
Y = mdbPath & "panos/Bptviewer.jar" & " " & [Combo40].[ItemData](0) & ".jpg"
Shell "Y", vbNormalFocus
That also did not work. I've attempted all kinds of syntax with the Shell command and still nothing works. I've searched all over tek-tips, google, and the VB and Access help menus and can still not figure this out. It seems like it shouldn't really be that difficult.
Can anybody suggest a way for me to simply click a command button that will pass a string (that uses varibales) to the command line?