[AccessD] A2K: Drag and Drop with Access

Darren DICK d.dick at uws.edu.au
Mon Jun 9 18:45:45 CDT 2003


Hi Arthur
What I wanted was simply some of the functionality we get on screen when we go into design view for a form.
In design view click on an object - Text Box, label, combo box, image control, whatever and you get the resize 
handles. Grab the top left handle and you can move the whole control and get a shadow/ghost image of the 
control as the cursor. Let go the mouse button and viola the control has been 'dragged and dropped'

I wanted something like that. It's for an ID card design app. User drags say...LastName control to bottom of card 
design area. Same for FirstName controls but this time to the top and same for Image control but to the far right.

Simple:-) <VVBG>

Many thanks in advance

Darren




----- Original Message ----- 
From: "Arthur Fuller" <artful at rogers.com>
To: <accessd at databaseadvisors.com>
Sent: Saturday, June 07, 2003 10:54 AM
Subject: RE: [AccessD] A2K: Drag and Drop with Access


> You can do D&D in Access, although it's difficult. I've got some code that
> lets me D&D in a treeview (i.e. move an employee from Dept X to Dept Y). It
> was a nightmare to figure out and then a night to write. I don't have
> anything truly portable yet; each new instance I have to rethink from the
> ground up. It's the conceptual stuff that's hard, and denying the illegal
> moves (can't drop a department on an employee, nor an employee on an
> employee, nor an employee on her current department). Once you get the code
> to allow D&D you find yourself writing against all the exceptions. Nine out
> of ten possible moves are illegal; the other is permitted. Makes you wish
> for a Java / .NET style Try / Catch construct in Access, but I suspect it
> isn't in the cards. On Error just isn't the same :-)
> 
> D&D can be very useful, in Access as in other languages. But at the Explorer
> level, for example, the exceptions are few (can't drop a folder on itself,
> can't drop a file on a file unless it's an archive file, &c). But in the
> higher level apps, order entry say, the rules are much more complex. I did a
> D&D a while back that lets the user select compoenents and from them create
> new assemblies. Any given component might be an assembly, except of course
> itself.
> 
> The D&D code IMO is trivial compared to the conceptual (you can do this, but
> not that or the other thing) part.
> 
> If you want an example of the raw D&D code I can supply same, but I stress
> that this is only the raw arithmetic. The logic you must define and then
> write yourself, and there is no (IMO) general solution for this.
> 
> Arthur 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Christopher
> Hawkins
> Sent: June 5, 2003 1:32 PM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] A2K: Drag and Drop with Access
> 
> 
> Ah.  I get you.  Sorry.  I mistakenly detected a tone of incredulty that
> drag n' drop could be useful in Access.  Once again, the shortcomings of
> non-inflected text communication rears it's ugly head!  ;)
> 
> -C-
> 
> ---- Original Message ----
> From: cfoust at infostatsystems.com
> To: accessd at databaseadvisors.com, 
> Subject: RE: [AccessD] A2K: Drag and Drop with Access
> Date: Thu, 5 Jun 2003 09:08:21 -0700
> 
> >I wasn't saying it couldn't be useful, but if you don't know the
> >purpose
> >of the action, the suggestions are likely to be off target.  If you 
> >need
> >a hammer, it doesn't help if some hands you a nail!
> >
> >Charlotte Foust
> >
> >-----Original Message-----
> >From: Christopher Hawkins [mailto:clh at christopherhawkins.com]
> >Sent: Thursday, June 05, 2003 7:42 AM
> >To: accessd at databaseadvisors.com
> >Subject: RE: [AccessD] A2K: Drag and Drop with Access
> >
> >
> >Drag and drop could be very useful, Charlotte.  As useful as in any 
> >other application.
> >
> >For example, I worked for a company that had a variable compensation 
> >product.  If we could have allowed the users to assign people or 
> >department to different compensation plans by dragging and dropping the
> >person or group's name over to a folder (or something) for the
> >appropriate plan, everyone would have been ecstatic.
> >
> >Just one instance where I can see it would be useful.
> >
> >Sadly, we never pulled it off.
> >
> >I worked for another company that managed to hack out a fair
> >drag-n-drop
> >in an Access 2000 app, but I never got to look at the code.
> >
> >-Christopher-
> >
> >---- Original Message ----
> >From: cfoust at infostatsystems.com
> >To: accessd at databaseadvisors.com,
> >Subject: RE: [AccessD] A2K: Drag and Drop with Access
> >Date: Thu, 5 Jun 2003 08:24:48 -0700
> >
> >>Where are you going with this?  What purpose is being served by the 
> >>drag and drop?
> >>
> >>Charlotte Foust
> >>
> >>-----Original Message-----
> >>From: Darren DICK [mailto:d.dick at uws.edu.au]
> >>Sent: Wednesday, June 04, 2003 8:59 PM
> >>To: AccessD List
> >>Subject: [AccessD] A2K: Drag and Drop with Access
> >>
> >>
> >>Hi All
> >>Anyone have any success with dragging and dropping of controls onto
> >>Access forms? Eg I have an Image control displaying an image and 
> >say
> >>it's in the top left corner of the form. I want to 'click' onto the
> >>image control and 'drag' it to say... the bottom left corner of the 
> >>form.
> >>
> >>I have found heaps of samples for VB but they use VB only events
> >etc,
> >>that I can't replicate or fudge in Access.
> >>
> >>Any suggestions??
> >>
> >>Many thanks in advance
> >>
> >>Darren
> >>_______________________________________________
> >>AccessD mailing list
> >>AccessD at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/accessd
> >>Website: http://www.databaseadvisors.com 
> >>_______________________________________________
> >>AccessD mailing list
> >>AccessD at databaseadvisors.com 
> >>http://databaseadvisors.com/mailman/listinfo/accessd
> >>Website: http://www.databaseadvisors.com
> >>
> >
> >_______________________________________________
> >AccessD mailing list
> >AccessD at databaseadvisors.com 
> >http://databaseadvisors.com/mailman/listinfo/accessd
> >Website: http://www.databaseadvisors.com 
> >_______________________________________________
> >AccessD mailing list
> >AccessD at databaseadvisors.com 
> >http://databaseadvisors.com/mailman/listinfo/accessd
> >Website: http://www.databaseadvisors.com
> >
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list