Have a sequence number field with your records. Let's call it seqno.
Have your records sequentially numbered.
Then, for the Down button's Click event: (air code, watch line wrap)
sub btnDown_Click()
dim nHold as long, nMax as long
nhold=me.seqno
nMax=dmax("seqno","yourTable")+1'we'll park the first entry there
currentdb.execute "update yourtable set seqno=" & nmax & " where
seqno=" & nhold
currentdb.execute "update yourtable set seqno=" & nhold & " where
seqno=" & nhold+1
currentdb.execute "update yourtable set seqno=" & nhold+1 & " where
seqno=" & nmax
end sub
Prakash wrote:
[color=blue]
> Hi !!
>
> In a Continuous Form with say 10 records, I'd like to have 1 button
> with an "UP" Arrow & another button with a "DOWN" arrow. By pressing
> either the Up or the Down Arrow, I'd like the user to be able to MOVE
> the records up or down the order.
>
> Something like in a WinAmp or MusicMatch Playlist.
>
> A little sample code would be much appreciated.
>
> Thanks & Bst Rgds,
> Prakash.
>[/color]
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html