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

2 Datasheets - Filter one with the other

Status
Not open for further replies.

TorF

Programmer
Sep 30, 2002
83
0
0
FR
I have 2 forms/datasheets:
* dts1 that displays Table1 with fields :
id_tbl1 : primary key

* dts2 that displays Table2 with fields
- id_tbl2 : primary key
- id_tbl1 : reference to Table1 primary key

I want that dts2 displays only records selected in dts1, using id_tbl1 fields.

For example, user selects 4 records in dts1.
So 4 id_tbl1 in Table1 are selected (example values 3,5,6 and 8)
Then dts2 have to displays records from Table2 where Table2.id_tbl1 is in (3,5,6,8)

Is there an "easy" solution to do this ??


I'm trying a solution :
On OnCurrent() event from dts1:
By Parsing dts1.Recordset, with SelTop and SelHeight, I find the values (3,5,6,8)
I send those values to dts2, and dts2 set its filter to "id_tbl1 in (3,5,6,8)

But this is boring, and with hundred selected records this will be really slow...

Have you an "automatic" solution or some help to give me ?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top