As an Asset must be linked to an Employee, and employees can have many Assets a 1-many form can be created where the Employee form contains an Asset sub-form that list all the assets associated with the employee.
Figure 1: Sample Employee/Asset Form
To create a Form with a Sub-Form in Access we can use the Form Wizard.
Note that for this to work you must have created the 1-many relationship.
Select "Create" and "Form Wizard"
Move all the fields from Table:tblEmployree to Selected fields using the [>>] Button.
Select tblAsset (use the drop arrow) then move the attributes from tblAsset to Selected fiellds using [>>], and click [Next]
You now get to choose how you want the form/subform laid out. Normally this would be Form with Subform(s)
Next it wants you to choose the layout for the subform. Normally you would choose Datasheet
Finally you need to name the form & subform. Using the common naming conventions, name the main form frmEmployeeAsset, anf the subform fsubEmployeeAsset. This will make them easy to locate if you have lots of forms in your database.
Click Finish to see the form/subform and this allows you to enter data.
The following form/subform will be created
As you can see, the design and layout of the form is fairly basic, so you should now go into design view to tidy up your form.
Some things to so
Rearrange the main form so the attributes are laid out better .
Change the labels so they are less "Computer " like (e.g., change EmpLastName to Last Name). Note that the Labels are joined to their data entry text box, and will move together. If you want to move them separately use the large boxes at the top left of the object.
Check the subform has all the attributes showing (you may need to make the subform frame wider)
Change the Title of the form
For the subform remove the default navigation buttons. You need to select the whole subform (use the selector at the top left of the subform) . If the properties are not showing choose "Property Sheet" then change "Record Selectors and Navigation Buttons" to "No"
Add the list box to the main form so you can select an employee (see earlier tutorial).
Add prev, next and add new record button to the Employee Form
Figure 1 (at the start of this page) shows a completed redesigned form