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!

Finding Multiple Entries

Status
Not open for further replies.

ddmtn546

Technical User
Dec 20, 2000
38
US
I am trying to build a maintenance database. I have a customers table and a workorders table. Each has a form for data entry. I have a command button on the customers form that brings up the workorder form. The last name field is the primary key. The problem - I would like to be able to toggle through all existing workorders, for the displayed customer record, whether closed or pending, up to a blank form for a new order. I havn't quit grasped how to tie these two form (tables) together. Thanks to any ideas in advance. Dennis
 
On your main form, create a subform. The subform you create should be bound to your workorders table (you will have to set the RecordSource property). Then, in the subform control properties link the Primary Key field of your customer table to the foreign key of your workorders table through the Master/Child relationship properties.

When you open the main form, the subform will only display workorders that are relevent to the current customer displayed on your main form.

PS. Having the last name as a primary key seems a little risky.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top