Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Opening file resource from form?

Opening file resource from form?

Opening file resource from form?

Is it possible to launch a database file resource from a form - if so how?

I have a .pdf document in my database as a file resource. I want to have a button on a form that will open the .pdf in acrobat reader.

I am thinking this might be possible with:


But as you can see, I am not sure how to reference the file resource?

Any suggestion on how to complete this or a better way to do it?

RE: Opening file resource from form?

If you say file resource, I imagine that the file is stored in a different document.
In that case, I suggest building a FileLookup view and a FileLookup form. In the view, list all documents that have an attachment. You will need to devise a key for listing them, and the first column needs to be sorted.
In the views Form Formula, set the name of the FileLookup form.
That form needs two things :
1) a rich text field (named Body if you follow the standards defined by Lotus) that is named the same as the one used to store attachments in the forms that appear in the view
2) the Form Properties need to have the "Autolaunch - first attachment" option activated (3rd tab)

When all that is done, all your code needs to do is get the document via the view and open it.
Given that the form used launches the first attachment, your OS should automatically open a PDF file in Acrobat, and XLS in Excel, etc..
Of course, these apps must be installed for the feature to work.


RE: Opening file resource from form?

If you are trying to write a formula for a button that will launch a file when clicked then do the following.

If Acrobat.exe was located on your system in C:\Acroread\Reader you would use the following in your formula:


This also works for mapped drives. So if you had a file that you want to launch on a shared drive just use the shared drive letter.

Make sure you use the double slashes otherwise the formula will not work.

Hope this helps

RE: Opening file resource from form?

..thanks guys.

Yeah I wanted an action button to open the pdf for printing. I ended up placing the file on a mapped network share and used the @Command([Execute]) to open it - works fine after I worked out the double slash thing!

Now I'm thinking I might place the path to the file on a profile document and reference it with @GetProfileField, so it will be easy to update the path to the file if its required.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close