Results 1 to 6 of 6
  1. #1
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139

    Get and Store the Full Path of a File on the Computer

    I'm sorry if this has been asked before. I have a text box that I want to store the full path of an image file in. And I have an image control that will show the image file whose path is set in the text box. I have all of that and it works. What I want is a button, that when pressed will open the windows explorer so a user can navigate to the image file, and when the correct image is selected the full path to it will be stored in the text box. To clarify, the text box, itself, will be empty on a new record. The button, next to the text box, will allow what I described.

    Thank you for your help. You folks have been great.

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    Research 'vba filedialog'. I used this code the other day:
    https://docs.microsoft.com/en-us/off...ion.filedialog

    Sounds like you'll want to set multiselect to false.

  3. #3
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139
    Quote Originally Posted by kd2017 View Post
    Research 'vba filedialog'. I used this code the other day:
    https://docs.microsoft.com/en-us/off...ion.filedialog

    Sounds like you'll want to set multiselect to false.
    I get a compile error that says, "user defined type not defined." And the debugger is on "Dim fDialog As Office.FileDialog"

    Thank you!

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    The message usually means you are missing a reference. For that, I believe the reference is the latest Office library you'd have on your pc. Check references in the vb editor.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139
    Quote Originally Posted by Micron View Post
    The message usually means you are missing a reference. For that, I believe the reference is the latest Office library you'd have on your pc. Check references in the vb editor.
    Yes! Success! It is working now.

    Thank you, so much!

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Great! Glad to see we solved it. Remember the error message for next time
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-30-2020, 08:48 PM
  2. Replies: 7
    Last Post: 02-03-2016, 04:28 PM
  3. Replies: 12
    Last Post: 02-25-2014, 02:33 AM
  4. search for folder and return full path
    By eladz949 in forum Programming
    Replies: 3
    Last Post: 12-23-2012, 02:26 PM
  5. Full app - find/store/open files in a table of any type
    By pkstormy in forum Sample Databases
    Replies: 2
    Last Post: 02-03-2012, 01:19 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