Results 1 to 4 of 4
  1. #1
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88

    open image file trough a button in form

    hello i just recently learned by placing the folder location within a text field, it would bring up the picture into the form when i open that record

    how can i make the the image file actually run right through a form via having its location placed within the text field in a form



    example each record would have a text field like this, (C:/documents/pictures/panda.jpg

    and i can change records in a form and once i click maybe on a button it would have a macro where the text field would run command run the jpg format picture file so i may watch the picture closely

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Not sure I understand what you mean by 'run the jpg' and 'watch the picture closely'.

    To dynamically display images, use an Image control and set the ControlSource property to the field with the path\filename. No button and no code needed.

    Is this a multi-user database?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    only for me,

    ok i have an item table, i have many records in it, each record contains item name item code and also a text field,

    i have placed the picture location in the text field, which looks something like this, C:/documents/pictures/item0059jpg

    i created a form with the item table and combobox so i search items, i want a button where it will run the C:/documents/pictures/item0059jpg <----- this image file will open, as if i double clicked on it,

    i basically want to be able to open images file trough my text field which has the location written in it, and the way it opens is as if i have double clicked on the image file with a mouse on the desktop, by hitting a button and the source of where the image file will be in the record

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    To open the image in its native program (like Windows Photo Viewer), try setting the textbox on form as a Hyperlink.

    Or consider: http://allenbrowne.com/func-GoHyperlink.html

    You want to allow user to select a file and populate the field with the path\filename? Use FilePicker dialog. http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-31-2013, 08:53 AM
  2. Switchboard button to open txt file
    By Dannat in forum Import/Export Data
    Replies: 17
    Last Post: 01-24-2012, 10:54 AM
  3. Click button to open a new image
    By tia in forum Forms
    Replies: 2
    Last Post: 10-10-2011, 11:03 AM
  4. Replies: 4
    Last Post: 10-05-2011, 01:28 PM
  5. Replies: 1
    Last Post: 09-27-2010, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums