[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Moving records up or down in a listbox based on Up or Down Button selection in a windows form

I need to allow my users to move records up or down in a list box.  I thought I would just add buttons (up and down) and move the items on 'click' of the button.  My problem is I can't come up with code to make this work.

I'll write the record(s) back to the DB table with the corrected order when the user leaves the form.

Thanks in advance..

1 Solution
the database does not care what order the listbox is in.
the database replaces or adds to the database according to the database parameters.
TMHPROGAuthor Commented:

Thanks... That should work.


Understood... I just meant I will do updates to the records in the list box with the reassigned order values.

Again.... thanks!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now