Drag/Drop File onto Form field to get file path

Posted on 2004-11-02
Last Modified: 2008-01-09
Is there a way to drag and drop a file from the Microsoft File Explorer onto some sort of Access form field such that the corresponding table field will end up containing the full path to that file?

I'm creating a simple Access application that keeps track of meeting minutes.  I would like to include links to all documents that are presented at each meeting.

In the past I have required users to place all of the documents in a single directory and then used VBA to read the files in the directory and set the corresponding field values.

But in this case the documents are all over the place and it would be easier to just have the user drag-and-drop the file icon onto some form object to get the path.

Is this easy?  Difficult?  Impossible?
Question by:dastrw
    LVL 7

    Accepted Solution

    There are no inbuilt DragDrop event for controls in Access, but this might get you out of trouble if you feel like doing a bit more research;en-us;233274

    An alternative would be to use common dialog or similar to allow users to browse for files.
    LVL 36

    Assisted Solution

    this might do what you want
    LVL 2

    Author Comment

    Thanks for these links.  Neither of these is exactly what I was looking for, but I will tuck them away for possible future use.

    Right now I'm thinking about going with the standard file explorer interface that I have incorporated into Access forms before.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now