Gosh, it's always the simple stuff that seems to trip me up!!!
I am writing a macro that needs to start up Snapfile viewer, then based on the login credentials of the user, open a specific .snp file. The file to be opened is determined by a text field in the credentials table that names the snapfile document for that user. Each user will need to open a snapfile, but the names of those files will each be unique.
So I open a hidden form that has a field showing the name of the snapfile to be opened. The macro's RunApp command line argument looks like this:
"C:\program files\snapshot viewer\snapview.exe " & forms!frmSnpFileName!snap
What is supposed to happen is that snapfile viewer starts, then loads in the file name found in the [snap] field on the form. Unfortunately, while snapfileviewer does start, the command line is choking on the relative argument for the filename. By way of testing, if I type in the literal filename on the command line argument in the macro, it opens perfectly.
Sooo... the question is, how do I get this command line parameter in my macro to understand a relative file pointer obtained from field text? I think this is a syntax issue - just a matter of getting everything letter-perfect.
Thanks in advance for any assistance!
SLH
I am writing a macro that needs to start up Snapfile viewer, then based on the login credentials of the user, open a specific .snp file. The file to be opened is determined by a text field in the credentials table that names the snapfile document for that user. Each user will need to open a snapfile, but the names of those files will each be unique.
So I open a hidden form that has a field showing the name of the snapfile to be opened. The macro's RunApp command line argument looks like this:
"C:\program files\snapshot viewer\snapview.exe " & forms!frmSnpFileName!snap
What is supposed to happen is that snapfile viewer starts, then loads in the file name found in the [snap] field on the form. Unfortunately, while snapfileviewer does start, the command line is choking on the relative argument for the filename. By way of testing, if I type in the literal filename on the command line argument in the macro, it opens perfectly.
Sooo... the question is, how do I get this command line parameter in my macro to understand a relative file pointer obtained from field text? I think this is a syntax issue - just a matter of getting everything letter-perfect.
Thanks in advance for any assistance!
SLH