Results 1 to 8 of 8
  1. #1
    Join Date
    May 2004
    Posts
    133

    Unanswered: Newbie: double click to open image in microsoft photo editor

    I have "Image path" table contains "Imageid" and "Path" fields.
    I create "display" form. It have a textbox control with control source set to "path" in "image path" table.
    I already know the run application command button wizard. But it only create a button which when click on it, it only open Microsoft photo editor only.
    All I want is when I double click on this button, it will open microsoft photo editor and also open the image based on path in "path" textbox.

    Please help me. I need your help.
    many thanks

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    Use the Shell function to open the application (see Help for it's syntax) and place the image path and name after the path to the application eg

    "C:\Program Files\Microsoft\Photo Editor.Exe" "C:\My Documents\My Images\image1.jpg"

    This would open the photo editor with the image you want.
    Regards
    Justin

  3. #3
    Join Date
    May 2004
    Posts
    133
    thank you. it works

  4. #4
    Join Date
    May 2004
    Posts
    133
    Help me. Help me. it don't work
    Here is my code of the button as you guided:
    Private Sub Command9_Click()
    On Error GoTo Err_Command9_Click

    Dim stAppName As String

    stAppName = "C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.EXE" & Me![Column3]
    Call Shell(stAppName, 1)

    Exit_Command9_Click:
    Exit Sub

    Err_Command9_Click:
    MsgBox Err.Description
    Resume Exit_Command9_Click

    End Sub

    When I click on the button. "file not found" message displayed.
    Could you help me again.
    thanks in advanced

  5. #5
    Join Date
    Dec 2004
    Posts
    13
    Quote Originally Posted by cuongvt
    Help me. Help me. it don't work
    Here is my code of the button as you guided:
    Private Sub Command9_Click()
    On Error GoTo Err_Command9_Click

    Dim stAppName As String

    stAppName = "C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.EXE" & Me![Column3]
    Call Shell(stAppName, 1)

    Exit_Command9_Click:
    Exit Sub

    Err_Command9_Click:
    MsgBox Err.Description
    Resume Exit_Command9_Click

    End Sub

    When I click on the button. "file not found" message displayed.
    Could you help me again.
    thanks in advanced
    am no expert, but just a thought....have you tried putting the file extension on the "Me!" file?

    ie Me!.jpg or Me!.gif


    just a thought

  6. #6
    Join Date
    May 2004
    Posts
    133
    OK. I already put file extension.
    [column3] is :
    e:\123.jpg
    thanks for the question

  7. #7
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    You need to put a space between the path for the application and the path to the file that you want to open

  8. #8
    Join Date
    May 2004
    Posts
    133
    thanks. finally it works for me.
    thanks again

Posting Permissions

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