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!

Sorting on a form with two tables

Status
Not open for further replies.

Bubsi

Technical User
Aug 27, 2002
21
DE
I have a form with data from 2 tables. The data of the main table I can sort by the indexes in the Record | Filter dialog box. But the data of the second table I can not sort in this way. There are also indexes on the second table.

Is there a possibility to sort the data from the second table in my form?


Thanks,
Bubsi
 
Bubsi,

You can use indexes to sort the second table; simply create a set of indexes that each contain the linking field as the first field. For example, suppose your key is ID and that you have fields called Desc, Date, and Amount.

To sort the detail table, you'd create three indexes:

-- SortDesc contains ID and Desc
-- SortDate contains ID and Date
-- SortAmt contains ID and Amount

If you want to provide descending sorts, you'd create a set of indexes that contain the same fields, but order things in the proper order.

As long as the first field in the index is the linking field, you can use the index to link.

Hope this helps...

-- Lance
 
Hi Lance,

thanks for your help.
But it won't work. Perhaps there is a problem with the linking of the two tables.
Is it possible to send you my example ?

Bubsi
 
Bubsi,

Feel free to send me an example at the email address shown in my username details or the one shown on many of the pages on my site.

I'll have a look at them and see what I can discover. I'll reply privately and also provide a summary replay to this thread.

Hoping to help...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top