Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with UPDATE query

Status
Not open for further replies.

paulmak

Technical User
Sep 23, 2002
3
CA
I have a table consists of 4 fields, ID (autonumber), Sort_Order (number), Text1 (text) and Text2 (text). The data from this table displays in datasheet view, order by the Sort_Order ascending, in a subform. I put the VBA code for the Sort_Order field so that the Sort_Order always start from 1 and increment by 1 with each new row of data. I also created two buttons, "move down" and "move up" so that I can re-arrange the order of the data. There are two Update queries for each of the 'move down" and "move up' button. Basically the first update query will update the row of data with Sort_Order to the NEXT AVAILABLE Sort_Order (Up or Down) and the second update query will update the (NEXT AVAILABLE) row of data with Sort_Order to the Sort_Order in the first query. The Sort_Order may not be in sequence if a row of data has been deleted in between the first and last Sort_Order. Please I need help to construct this 4 queries, 2 for "move down" and 2 for "move up".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top