Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115

    Opening an external folder - Access 2016

    I want to put a button on a Form that will open a specific Folder. The purpose is to make it easy for the user to add an image (jpg or png) to a folder that contains images already. These images are then shown on the Contact form.
    I know that the user can go outside the db and go to the folder - but I would like to make it easier for the user.


    I have researched and tried and thought I found a way. However the folder is opened in a Read Only format and the user will not be able to "save as picture" or "copy picture" to the folder. What is the criteria or switch that will open the folder in a format whereby the user can add an image. The code I am using is:
    Code:
        Application.FollowHyperlink "C:\Users\JackJones\Desktop\DBFolder\DBImagesPeople"
    Thanks for your help. Leon

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Users are able to directly open folder and add/delete files?
    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
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    June7 - thanks for getting back so soon. Yes. On the form (Contacts) there (among others) 2 buttons. One for LinkedIn (a good place to find people photos) and one button for "Add Photo". I will add a screen print at the end. The idea being that the user can go directly onto LinkedIn, find the person and therefore the image, select it, save as picture, press the Add Photo button and go directly to the People Folder. It should then be a simple matter of pasting the image into that folder (with a name like FredBrown.jpg). This image will then be available to show on the Contacts page. I hope this helps. Leon
    Click image for larger version. 

Name:	AddingPeopleImages.png 
Views:	28 
Size:	5.2 KB 
ID:	46259

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I am confused. If user saves image into folder via browser "Save Image As", why would they need to open folder via FollowHyperlink?
    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.

  5. #5
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    june7 - thanks. The idea is to make it as easy as possible for the user - they are not all good at using a computer!! I was trying to avoid using the browser. If they are happy going the "long route" to add the image to the image folder, good. Using my "Add Photo" button on the Contacts form should make it much easier as they do not have to leave the db. Leon

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    The way I would do it is....
    Get the user to select the picture
    YOU copy the file to your document photo location and save the path in your DB using VBA.
    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

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Have a look at the attached example app
    There are 3 forms showing different methods of displaying all the images in a folder - frmImageFiles is probably closest to what you want

    For more information, see Folder Image Viewer - Mendip Data Systems
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Still confused. How is image downloaded from web page without using browser? You have some code?

    I have no problem opening folder with FollowHyperlink and copying files.
    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.

  9. #9
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    Welshgasman - thanks for that - probably the closest answer to what I am actually looking for! Thanks. I now have to work through the code and "personalise" it to my db. And I am not fully conversant with code! But I will work on it. Thanks - Leon

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I never supplied any code, I rarely do, just a method?, that would be isladogs?

    Knowing Colin's code, when you paste that in, you will be able to use it in many places from now on.
    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

  11. #11
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    Welshgasman and Isladogs - Many thanks and my apologies for the confusion. In my defence, I have one db project at the moment. But there are 3 or 4 sub-projects, as part of that, that I am working on. And getting not very far! I have worked out the system, I know the pieces, but getting them to fit is not easy (in my mind!) - and it gets more difficult as the hours pass! There! I have said my piece!!! �� But my genuine thanks go out to all the masterminds that have helped me. Please do not stop. Thanks - Leon

  12. #12
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    June7 - Thanks but I use FollowHyperLink and get to the folder, no problem. The problem is in trying to paste an image - the folder appears to be "Read Only". I do not want the user to have to go outside the db. I want them to be able to find, copy and paste an image into a pre-determined folder. Leon

  13. #13
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Leon,
    Can you post a copy of the database--remove confidential info - use names like Porky Pig, Barb Dwyer...?
    There appears to be confusion with the requirement and advice offered, so let's deal with a "partially" working example.

  14. #14
    LeonS is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2014
    Posts
    115
    DBImagesPeople.zipAccessForumDB01.zip

    Orange Yes!! There is 1 form containing 2 buttons. Both, I hope, self-explanatory. And there is more information in the Event procedure of the Add Photo button. There are also 2 files in zip format. I hope this helps. Leon

  15. #15
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Only 1 file in the zip. An accdb with only a form with button. And overview of what the Click event should accomplish.
    Always use Option Explicit as second row in a module.

    Perhaps someone else can decipher the need with some options.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 01-26-2021, 12:20 PM
  2. Replies: 1
    Last Post: 10-30-2018, 12:12 PM
  3. Replies: 4
    Last Post: 02-03-2017, 02:34 PM
  4. Replies: 16
    Last Post: 05-21-2015, 07:50 PM
  5. Open an external folder specific by a form field
    By AccessNoob16 in forum Forms
    Replies: 11
    Last Post: 04-09-2012, 01:30 PM

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