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

List Selected Rows in Subform

Status
Not open for further replies.

thegentleman

IS-IT--Management
Apr 4, 2001
65
GB
I have a subform displaying a datasheet something like this:

Line ID | Booking Ref | Cost
----------------------------
1 | 625467 | 2567
2 | 625467 | 657
3 | 788676 | 7635
4 | 677788 | 764

Because it is a datasheet the user can highlight any number of rows by clicking the row selector to the left of the datasheet (like you do in Excel). I need to know the Line ID of each row that the user has highlighted.

Is this possible? If so how is it done.

Thanks in advance,

~tg
 
Hallo,

I dunno if you can with a subform.
You can if you make it a list box. Use the MultiSelect and Selected properties.

- Frink
 
I've never used it, but here's a link that seems to address the issue Determine selected records in datasheet view.

What I've done in similar situations, is to have a Yes/No field in the underlying recordset of the subform, then a checkbox on the subform and use that as criterion for further processing (then also have some routine to either select or deselect all).

Roy-Vidar
 
If you don't want to use a multi-select list box, then you can simply add a yes/no checkbox field to the table and subform allowing users to flag specific records. Then just call up all true records or cycle through the recordset finding records where your checkbox = true. But if you do this, you'll probably want to run a clear routine making all check boxes false when the form is opened or closed...or something like that.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top