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

switchindex on form

Status
Not open for further replies.

harrymossman

Technical User
Sep 5, 2002
255
US
We have a form with 2 tables: employees (primary table, read-only) and work_log. Work_log has index, employee, work_day, project and hrs_worked.

We would like to sort work_log by work_day, which is a date field (D). I tried a button with switchindex code but it didn't work. It occured to me that this was because work_log is not the primary table.

Is there a good way to do this? Thanks for any help you may give. I am very rusty at Paradox.

Harry
 
In order to view the Worklog table by it's secondary index you must link the Employee table to the Worklog tables secondary index in the Data Model. It's easy to do, go to Format -> DataModel the two tables will be displayed with their field names in the upper window and their Primary and Secondary indexes in the bottom window. Select the Key field from the Employee table and drag it on top of the secondary index in the Worklog table and you're done. Now when you run the form the worklog table will be displayed in the order of the secondary index. Make sure that the secondary index has the primary key as it's first values and the date field as the next.

Let me know if you run into any problems.
Perrin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top