Command buttons on forms

slrphd

Registered User.
Local time
Today, 15:00
Joined
Jan 6, 2004
Messages
91
I thought I could use a command button on a form to run another application. In my table in record contains several maps. I want to build a form that identifies each map in the record and, when I click on the command button, opens the file containing the map (a *.pdf file). There appears to be a substantial amount I do not know.
 
I wouldn't store the actual pdf file within your db but store the file path value in a field.

ie: c:\MyDocuments\map.pdf

You could then use a shell command to open said file within a pdf reader application.

For instance:

Dim strPathName As String
strPathName = Forms!YourFormName!YourPathFieldName

Call Shell ("C:\Program Files\Adobe\Acrobat 4.0 \Reader\AcroRd32") & strPathName
 
Or, rather than coding, you can just set the Hyperlink property of the command button to the path of your document.
 

Users who are viewing this thread

Back
Top Bottom