Results 1 to 3 of 3
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    dblclk .pdf? (2000)

    I have a form with a combo box listing products. A dblclk action would open a form contaning info on that product. Recently I was able to obtain MSDS (Material Safety Data Sheet) in .pdf with more appropriate and detailed info. Is there some way to call the .pdf directly from the dblckl action without using the old form?
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dblclk .pdf? (2000)

    You can open a .pdf document using the Shell instruction, or by following a hyperlink to it, or by using ShellExecute (see example code below for the latter). I don't know, however, how to locate the relevant product automatically; perhaps somebody else knows a command line switch or something like that.

    ShellExecute provides the equivalent of opening (or printing) a file in Windows Explorer.

    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long

    Private Const SW_SHOWMAXIMIZED As Long = 3

    Private Sub cboProducts_Click()
    Dim lngResult As Long

    lngResult = ShellExecute(hWndAccessApp, "Open", _
    "CatabaseMSDS.pdf", 0&, 0&, SW_SHOWMAXIMIZED)
    If lngResult <= 32 Then
    MsgBox "Couldn

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: dblclk .pdf? (2000)

    Thanks for the input Hans. I gave this some considerable effort, and then just scanned the docs into the existing forms as bound objects. Not as clean as I would have preferred, but the results seem to work OK.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •