• dblclk .pdf? (2000)

    Author
    Topic
    #380107

    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?

    Viewing 0 reply threads
    Author
    Replies
    • #635363

      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”, _
      “C:DatabaseMSDS.pdf”, 0&, 0&, SW_SHOWMAXIMIZED)
      If lngResult <= 32 Then
      MsgBox "Couldn

      • #635465

        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.

    Viewing 0 reply threads
    Reply To: dblclk .pdf? (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: