Using the mouse to click and drag records to change their order

  • Thread starter Thread starter John Baker
  • Start date Start date
J

John Baker

I would like a user to be able to reorder a group of records on a form by
using the mouse to click and drag a record to its new location (same as
changing the tab order on a form)
Can anyone help me do this.

John Baker
 
Do you mean records, or fields ?

You can drag fields around in datasheet view, but not in any other, without
some tricky coding.

The order of records is set by the sort order, either of the underlying
query, or by whichever ordering you have set on a field - rightclick on a
field, and change the sorting from the menu.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Thanks for your reply Adrian
I did mean changing the order of records in the datasheet view.
I know how to change the order of fields and also to resort the records on a
particular field. I guess I am looking for the tricky code you are talking
about.

I would like to be able to drag a record to a different location and this
would then change the sort order for this particular record. I guess I would
need a field to keep the sort order in. This field would be changed when a
record is dragged to a different spot.

I think where I am stuck is on how to write code to actually drag a record
to a new location.

Any help greatly appreciated.

John Baker
 
You will need some really tricky low level code based on getting the
control's Windows handle to do that. Suggest you talk to Stephen Lebans, he
is the wizard of control manipulation.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Back
Top