Results 1 to 13 of 13
  1. #1
    Ambre is offline Novice
    Windows 11 Office 365
    Join Date
    Apr 2023
    Posts
    11

    How to view image in browser

    Hi,



    I have a database that tracks Customers. Associated with this database are a series of folders, one for each customer, that hold various image (.jpeg) documents.

    I would like to be able to select a document for the current customer from a dropdown in Access and show it in a browser, but I have no idea how to go about doing this.

    I would really appreciate anything you could share.

    Regards,
    Ambre

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    various image (.jpeg) documents.
    If by "document" you mean strictly jpg images, you would use an image control, not a browser.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    Here's an example. You need a reference to microsoft scripting runtime and microsoft Access xx object library.
    It shouldn't be too hard to figure out what it's doing but ask if you have questions.

    Select a folder and click list files. You can then select a file from the list to display in the image control.
    The example is filtered to return only these file types - ".jpg,.jpeg,.png,.bmp" You can add or remove filetypes as needed.
    Attached Files Attached Files
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    Maybe "browser" means an actual browser app. FireFox, Edge, whatever?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Amicron's Avatar
    Amicron is offline Access Guru
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Amherst, New York (near Buffalo)
    Posts
    32
    How about this: Images
    Richard Rost
    President/CEO
    AccessLearningZone.com

    P.S. Be sure to stop by my web site for free tutorials, tips, tricks, and lots more.

  6. #6
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    By browser, do you mean the browser control?

  7. #7
    Ambre is offline Novice
    Windows 11 Office 365
    Join Date
    Apr 2023
    Posts
    11
    The files are all images. Some of them are catalogue pages and are very small print. I want to open them in a browser so that the user can use the expand/contract, cut and paste, and print functionality available in a browser.

  8. #8
    Ambre is offline Novice
    Windows 11 Office 365
    Join Date
    Apr 2023
    Posts
    11
    I do mean a browser app. The user then has all the browser functionality to manipulate the image.

  9. #9
    Ambre is offline Novice
    Windows 11 Office 365
    Join Date
    Apr 2023
    Posts
    11
    I am new to Access. What is the 'browser control'?

  10. #10
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    Access has a web browser control, but it's not what you want to use here. The browser control I referred to is for displaying websites, or html/css/js documents.

    There are two options here, the easiest is to just trigger the opening of the folders that contain the images with the explorer.exe application that is native to Windows.

    The harder option is to create a form that looks into all the folders associated and shows all the images in those folders, creates a temporary table with each filepath and a subform with a continous form displays all of the pictures. With that, you will need to program the features you need. Which is not going to be quick, because Access itself does not have a file browser integrated with all the features you need.

  11. #11
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    Why not use whatever the native app is to open the file types? Picture viewer for pictures, pdf viewer for pdf's, word for word doc's, etc.

    You can use code like this to open any file in it's native program. http://access.mvps.org/access/api/api0018.htm

    A slightly modified version of the code in my example will list the files in a folder to either a list box or a combo box depending upon which control you pass to it. Then in the afterupdate, double-click or some event of the control, you use the fHandleFile code to open it in its native program.

    another example reflecting the above attached
    Attached Files Attached Files
    Last edited by moke123; 04-24-2023 at 09:07 AM.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  12. #12
    YAroslavDah Guest
    Windows 7 64bit Access 2013 32bit

    -

    I have a text file with 267 coloumns. When trying to import via access, the coloumn will be auto truncated at from 256 coloumn onwards. Anyone can advise on how to import all coloumns from these text file into 2 tables in the Access? tks in advance.

  13. #13
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Quote Originally Posted by YAroslavDah View Post
    I have a text file with 267 coloumns. When trying to import via access, the coloumn will be auto truncated at from 256 coloumn onwards. Anyone can advise on how to import all coloumns from these text file into 2 tables in the Access? tks in advance.
    Please DO NOT hijack someone else's thread.
    Start your own with a relevant title.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 7
    Last Post: 03-29-2022, 11:38 AM
  2. Replies: 4
    Last Post: 04-16-2020, 12:49 PM
  3. Replies: 3
    Last Post: 08-26-2015, 09:50 AM
  4. Replies: 8
    Last Post: 11-06-2012, 03:41 PM
  5. Replies: 2
    Last Post: 10-10-2011, 10:58 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