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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying Record Selector Buttons

Status
Not open for further replies.

dgriffin

Programmer
May 26, 2001
50
US
I have a Continuous Form with a table as its data source. I need to set a yes/no field for each record in the table when a user selects a range of records using the Record Selector buttons.

The "range of records" that I refer to is when the user clicks on the record selector button (on the right most side of the display) of say, record seven, and while holding the mouse button down, drags the cursor down the column of record selector buttons, causing records 7 throught 19 to be "selected" (for example).

I have not been able to find any property that can be tested for "true" indicating that a particular record is one of the selected ones.

I am aware of the SelHeight property, but that will only tell you HOW MANY records are selected, not WHICH ONES.

Some detailed guidance would be greately appreciated.

Dan
 
Hi Dan...

Could you use the mouse_down and mouse_up events to determine where the user started dragging, and where the user finished dragging?

Something like (pseudocode anyways)...

On Mouse_Down, obtain record number that was clicked.
On Mouse_Up, obtain record number that was dragged to.

set 3 variables, called start,end, and recnum - define them as long

if mouse_up > mouse_down then'user dragged down the list
start = mouse_down
end = mouse_up
else 'user dragged up the list
start = mouse_up
end = mouse_down
end if

for recnum = start to end
goto each of these records copy the value into a new recordset (call it rstSelected for example), where all the values in rstSelected are your selected records on the form.
next recnum

etc etc...

HTH (in some way, shape, or form)

Greg Tammi, ATS Alarm Supervisor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top