Full Version: Drag And Drop File Path
UtterAccess Forums > Microsoft® Access > Access Forms
MrFormula
I would like to drag a file on to a Text box and have it store the file name with the path in a field. I have been searching for quite a while but I can't find how to do it. I did find something about tree view but I don't know how to enable it.
It seems like a simple task but I guess I have stumbled into something difficult.
Any Suggestions would be muchly appreciated.
theDBguy
Hi,
Have you seen the latest addition to the Code Archive by Jack?
Just my 2 cents...
jleach
Indeed, Mark and I have been working up a nice little project for that.
On the meantime, the core code is there that works well.
Drag n Drop
It's still rather beta, I'd be curious to hear any feedback...
hth
MrFormula
It looks like exactly what I am looking for. I will be playing with this.
Thanks
jleach
Just to keep in mind, we're in the final stage of wrapping up a nice class for that FeedMe demo, all sorts of bells and whistles (opening explorer if you want, placing it on the screen where you want, turning shortcuts into the target file paths, removing duplicates, etc).
Keep an eye on the thread there... the core dragdrop stuff is fairly solid, but there's a few minor updates to it, and the FeedMe class is shaping up pretty nice. I'm going to guess towards the end of the weekend it should be released, if not almost certainly next week some time.
I hope you are able to find it useful, there's been a lot of effort put into this one.
Cheers,
MrFormula
I don't know what I am doing wrong but I imported your module and both of your forms but I can't get it to function inside my DB. Your Demo DB works great but after the import I try them in my db and they don't work.
Is there anything special I need to do to enable the code?
I am using the DragandDropAPI
jleach
Did you take a look at the code behind the form as well? The form needs to be 'set up', as well as the textbox. And there's a public sub in the form for receiving the files as well.
When the form opens, it needs to register for drag drop, and when the mouse moves over the textbox you want, it needs to make it 'actively receiving'. The public sub is where the files come from when they're dropped. These things will be required code in each form/control you want to use.
Let us know if there's any more info you need to get it going
hth
MrFormula
OK I have it imported and it seems to be working ok. The part I don't understand is it will just quit working. I close and open the form, when I drag and drop it does nothing. I try to open the forms that I have not messed with (your forms) and they don't work either. I close and open the db and then they work again.
love the code... it defiantely will help my db.
jleach
I don't recall offhand... I do remember something of the sort when I first started putting it together, but had thought it was taken care of in the many drafts before it was first posted.
Is it only after you close a drag/drop form and open it again that it doesn't seem to work? Does it work fine (over and over) as long as the form is not closed?
I just tried this on the v1.0.1 release I put in the code archive thread last night and couldn't seem to reproduce it. If you could let me know the following, it'd go a long way towards debugging:
- if it only happens after the initial form is closed and another form is opened
- if it happens consistently or randomly
- your Access version (including 32bit or 64bit if on Access 2010)
- your OS version (including 32 or 64 bit)
Thanks,
jleach
Hi,
Have you been able to get this squared away? I'm very interested in taking care of any problems with the code... when you have a minute to pop back in and let me know one way or the other that'd be great.
Thanks,
MrFormula
Sorry I have not been programming for a little while. I hope to get back into it a little more this next week. I have several changes on my plate but when I get to the drag and drop I will let you know what I figure out.
Thanks for all your help.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.