There's two demos here. The FeedMe demo is additional functionality to the DragDrop stuff. The DragDrop has the real work in it. The GUI class is required for the FeedMe functoinality. The latest version at the time of this post is included in the FeedMe demo.DragDropApiThis demo shows how to implement dragging and dropping of files from windows explorer into your application.Included in the zip file is a complete documentation of the DragDrop functionality, starting with simple usage and covering most aspects that the average user might come across.I've seen two demos of this before: one which utilizes a subform as the "drop area", and one that does not. Myself and at least one other (thanks Alan) experienced problems when attempting to use the drag/drop API functionality in a standalone form: the only way to successfully implement it with the few examples to be found is to setup the drop area as a subform.The problem is with a callback function from the API that clogs up the VBA project. The callback function required for drog/dropping has to process every system message sent to the window we're using. In the other demos I looked at, hook into the callback is placed when the form is opened and removed when the form is closed. This means that throughout the life of the (standalone) form, that callback is running rather madly: so much that better than 90% of the time it was crashing Access.When used in a subform, and the hook is placed at the open of the subform and removed at the close of the subform, the behavior is much better. For whatever reason, subform window callbacks do not seem to run unless the mouse is placed over the subform. The general result is a satisfactory implementation of drop/dropping: the subform callbacks are not enough to crash Access. Just don't open the subform as a standalone form, unless you want to crash Access.When I initially set out to use drag/srop functionality, it was intended to drop a file into a textbox that would enter said file into the system. At the time, I wasn't aware of the subform implementation, and set out to find a way to keep Access from crashing. The solution I came to, the one posted here, works to drop files into a specified control on a standalone form.The means I used to obtain this was to remove the hooking from the form's open/unload events, and instead have the hook only active while the cursor is over the control that takes the file. This works well as a standalone form implementation, but there is one minor quirk:The form, either standalone or sub, needs to be registered to accept drag/dropped files. When this form is registered, dragging files anywhere over the form results in the cursor changing from the standard pointer to the dragging icon. This is misleading in the standalone/control implementation as it more or less tells the user that they can drop the files anywhere on the form, but in fact they can only drop them into the control. I cannot think of any workaround to this, but you may or may not view it as a dealbreaker.In retrospect, using the subform implementation with a sub just large enough to enclose the required control may be a preferable method of handling it: then the user will only see the drag/drop icon in a valid drop area, though loading a subform, depending on how many, will add considerably to the form's load time.One major advantage to using the MouseOver event to hook into the callback rather than a form's open/close (or load/unload) is that we can now implement drag/drop capabilities one more than one open form at a time. Because the callback needs to be in a standard module, it becomes quite difficult to maintain instancing directives on it. While the message callback does utilizes the form's Handle, I don't know that I'd trust it enough to have two subforms open at once and have the function continuously running and able to keep everything sorted. Using the MouseOver of a control (or the Detail section of a subform) ensures that the callback only has to handle one window at a time.DragDrop FeedMeThe DragDrop FeedMe demo contains the same drag/drop code as the DragDropAPI demo, but this one has functionality that hides the Access window and pops up a small form so the user can drag files into it without having to work around the Access app or resize it to get files:The V2 FeedMe includes a class module and demo for it to select a variety of different settings and options. The GUI and modDragDrop modules are required and included in the demo. I haven't done much for documentation on it yet, but there's not really a lot to document on it. The class provides properties and one method, set them as desired, and that's about it.V2 Demo Snapshot:FeedMe_SS.gif ( 90.88K )Number of downloads: 1204

I've been talking to Jack about this as I found that it wouldn't allow attachments into a control when the form is a subform. With Jack's permission I have reworked some of the code so that it will be able to work out if a form has a parent (and in turn if that has a parent) and ensure the code still works.

I have added 5 new forms to demonstrate how this nesting works. Select any level and the drag and drop still runs now.I have noted the code seems to stop working intermittently if you open and close forms in the same session and this is consistently problematic in my revised version and Jack's original version.I will try to convert this into a class rather than a vanilla module to try to eliminate this problem and allow multiple drop controls on the same form. I will also see if I can do some work to sort out the issue Jack raised about the icon changing on whole form including parents.

First let me say I am extremely grateful that you posted this! I wanted to give you credit where it was due . On another hand i took it one step further by adding a file import/logging based on the files that were dragged and dropped. I wanted allow a user to drag the files he wanted to add to the database, copy the file to the local server, and then hyperlink to it. This way it is not stored in the database and is extremely easy to use. I know I did not clean up the code for posting, but wanted to share it as everyone else has been more than generous sharing their coding. This script will add on the functionality below;

1. Take files listed in the ctrl box from feed me and log them on another table2. Take the files and copy them to the folder/server specified