Solved

Drag & Drop files from explorer into an MS Access Form?

Posted on 2006-10-20
7
2,021 Views
Last Modified: 2008-02-01
I would like to be able to create a form that populates a table with the filenames and paths of files that are dragged and dropped into one of the the form's controls.

I've seen examples of how to facilitate drag & drop between text-based controls withing access, or from menu items or between list drop down boxes...  but that is not what I need.

I need to be able to drag a NON-MS-Access object (a file in a folder) onto a form and have the form populate with the attributres of the file.

Does anyone know if this is even possibe?
If so,how??

Thanks!
0
Comment
Question by:cef_soothsayer
7 Comments
 
LVL 8

Assisted Solution

by:Jillyn_D
Jillyn_D earned 165 total points
ID: 17774139
Hi cef_soothsayer,

I've never seen a drag-and-drop done, but if you don't get an answer to that, you could certainly open an explorer window through Access and allow the users to select files by double-clicking them.  I've done this for selecting db's to compact and repair, but I don't see why you couldn't just capture the file name and path.

Good luck!
~Jillyn
0
 
LVL 15

Assisted Solution

by:cquinn
cquinn earned 167 total points
ID: 17774144
There is example code here that works using API calls:

http://www.mvps.org/access/api/api0032.htm
0
 
LVL 1

Author Comment

by:cef_soothsayer
ID: 17775104
cquinn,

I saw that earlier when googling, but couldn't get it to work.  The AddrOf() function is not included and the refered to download is writtenfor Excel and will not compile in access.

JillynD,

Good idea.  However, these files are coming from email and I'd actually like to drag & drop them in and have MS Access place them in a particular folder and rename them then put the new file/path into the fields of the source table for the form.

Thanks.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 168 total points
ID: 17778282
As others have said, Access doesn't really do drag-n-drop. There are some ActiveX controls which may allow you to do this, but you'll still have to write the VBA code to manipulate the files after moving them to your folder.

I use Sky Software's Explorer controls in one of my Access projects. I can drag/drop files from outside Access into other folders, but I can't drop them onto native Access controls. The controls do expose a LOT of events/properties, so you may be able to work with them.

http://www.ssware.com/
0
 
LVL 1

Author Comment

by:cef_soothsayer
ID: 17893818
I still dont have a "good" answer to this, but I've created a work around so dont need it anymore.
I'll split the points.
Thanks.
0
 
LVL 84
ID: 17894379
I don't agree with the C grade; the correct answer was presented to you (i.e. Access doesn't provide drag-and-drop functionality) and while it may not have suited your needs, it _was_ the right answer and therefore deserves, at the very least, a B grade.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

707 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

13 Experts available now in Live!

Get 1:1 Help Now