Here is my table structure:
tbl_Questions
----------------
Question_ID (autonumber)
Topic_ID (lookup)
Question_Title
Question_Number
(and a few other irrelevant fields)
What I'd like to do is populate a listbox with all records from tbl_Questions which have a certain Topic_ID, ordered by Question_Number (eg, 1 > 10). This is easy enough.
I would then like to be able to move Questions up and down the list box using two buttons. Once the order is decided an Update button is clicked and all the records Question_Number values are updated according to the order in which they were moved in the list box.
The main reason for attempting to use a list box is to stop two records being given the same Question_Number. Can anyone point me in the right direction? Or if there is a better way to do this, I'm all ears!
Thanks.
tbl_Questions
----------------
Question_ID (autonumber)
Topic_ID (lookup)
Question_Title
Question_Number
(and a few other irrelevant fields)
What I'd like to do is populate a listbox with all records from tbl_Questions which have a certain Topic_ID, ordered by Question_Number (eg, 1 > 10). This is easy enough.
I would then like to be able to move Questions up and down the list box using two buttons. Once the order is decided an Update button is clicked and all the records Question_Number values are updated according to the order in which they were moved in the list box.
The main reason for attempting to use a list box is to stop two records being given the same Question_Number. Can anyone point me in the right direction? Or if there is a better way to do this, I'm all ears!
Thanks.