Sub Forms I think

  • Thread starter Thread starter novabill
  • Start date Start date
N

novabill

Guest
How do I create a form that would allow me to enter in like a date and employee number and then enter several records that all belong to that date and employee number. Then I could enter a new date and employee number and then enter records in that would be attached to the new date and employee number?
 
Yes, the use of a subform would help you with this. First of all, you need to have a way to link the form and subform. If you use the Form wizard, you can maybe do this, but you need to have the right relationships established and the table your subform is based on needs to have a primary key field that is also in the table your main form is linked to. If the form wizard does not work for you (or you don't want to use it), you can create a form using the date/employee information. Then create another form (to be your subform) with the information you want related to the information in the main form (be sure to include some sort of id number or primary key that you can use to link the forms). Open the first (main) form in design view, from the database window drag the subform to the main form. The subform is now a control on the main form. Open the properties box for the subform, and in the "Link Child/Link Master Fields" properties, select the fields you want to use to link (ID or key). Help has more to offer on this.
 
Thanks....I am all set!
 

Users who are viewing this thread

Back
Top Bottom