Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2006

Tip: Looking for answers? Try searching our database.

Sort listbox by drag and drop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bvdahl - 20 Nov 2006 14:42 GMT
Hello,

Is it possible to sort a list box by dragging a line up or down the list?

I have a form that has all the information about a single truck, and in the
list box, I have a line for each delivery that truck is scheduled to do. I
would like to sort this list box manually in order to decide what order the
truck shuold make these deliveries.

thx

Baard
Douglas J. Steele - 20 Nov 2006 15:16 GMT
Not the standard listbox that comes with Access, but take a look at what
Stephen Lebans has at http://www.lebans.com/vb_listbox.htm

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hello,
>
[quoted text clipped - 10 lines]
>
> Baard
Klatuu - 20 Nov 2006 15:23 GMT
That is not going to work with a list box.  I would suggest, instead, you use
a subform.  Add a DeliveryOrder field to your table and include it in the
subform so the user can enter the order there.

> Hello,
>
[quoted text clipped - 8 lines]
>
> Baard
bvdahl - 20 Nov 2006 23:53 GMT
hmmm..... a sub form would not really be practical with the form I am making,
but I think I found a pretty good way of doing this, that does not involve
drag and drop.

I have a hidden, unbound text box in the form that starts out with the value
one. When I double click a delivery in the list box, that record gets updated
with a position number equal to that in the text box. After each double click
in the list box, the number increases by one.

The list box is sorted by that position number, of course.

There is also a reset button if I would like to change the order of the
deliveries.

Any comments? Is this a too roundabout way of doing things?

Baard

> That is not going to work with a list box.  I would suggest, instead, you use
> a subform.  Add a DeliveryOrder field to your table and include it in the
[quoted text clipped - 12 lines]
> >
> > Baard
Klatuu - 21 Nov 2006 15:14 GMT
I don't see any problem with that.

> hmmm..... a sub form would not really be practical with the form I am making,
> but I think I found a pretty good way of doing this, that does not involve
[quoted text clipped - 30 lines]
> > >
> > > Baard
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.