954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Click & Drag from one list box to another list box in Access 2007 VBA

Hello!

Now I am trying to make selection of Customers easier for my user. My user's business involves making deliveries on routes. Every customer is assigned a route number, which references the route in the route table.

In my form I want to have two list boxes, side by side. lb1 showing customers already assigned to the route, and the other. YES, all other customer NOT assigned to this route - lb2 ... clever huh ? :-).

Besides the usual buttons ( " < " & " << ", " > " & " >> " )< I would like to be able to click on a name in one list box and drag them to the other list box to assign/unassign them to a route.

Click, drag and drop from lb1 to lb2. OR click, drag and drop from lb2 to lb1, with the respective list boxes being updated....

I have done this in PowerBuilder back at the turn of the millenium..... as well as more recently in Delphi 2010. I am trying to get used to Access, VB & VBA..... Gads.... did I just say that ?

Names would appear in the other list box, & disappear from the original list box.

Can anyone help me out with code that would do that?

Many thanks.....

OASsy1

OASys1
Newbie Poster
6 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

You would be better to put it under a double click event on the list box. ie the user double clicks the name to move it to the other box. it is simple to implement and is faster and easier for the user to use than drag and drop.

ChrisPadgham
Posting Pro in Training
413 posts since Sep 2009
Reputation Points: 102
Solved Threads: 78
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: