Adding a Subform to a Form in Design View

From NeoWiki

(Difference between revisions)
Jump to: navigation, search

Lorinda (Talk | contribs)
(New page: {{TBBA Header}} Because the new Bird_Pictures table and form we created (See Creating a Table and a Form to Store Images ) includes a PicFieldTripID field, it would be helpful if ther...)
Next diff →

Revision as of 02:59, 25 October 2007

This article is part of the To Base and Back Again tutorial series.

Because the new Bird_Pictures table and form we created (See Creating a Table and a Form to Store Images ) includes a PicFieldTripID field, it would be helpful if there were an easy way for users entering data in the Bird Pictures Data Entry form to look up the Field Trip ID for a particular date without having to leave the form. We can do this by adding a subform to our form.

  1. Open the Bird Pictures Data Entry form for editing by control-clicking on the form in the main database document window. (make sure you have chosen Forms in the left hand column of the window)
  2. Make sure that the Form Design toolbar is visible. (Go to the Tools menu and choose Toobars if Form Design is not checked, select it.)
  3. Click on the Form Navigator button on the Form Design toolbar. (It looks like a form icon with a small Navigator icon on it.) The Form Navigator
  4. Right-click or control-click on the MainForm icon and choose New and then Form from the contextual menu. An new form icon named Standard appears in the Form Navigator
  5. Right-click or control-click on the Standard form icon and choose Properties the {{Window|Form Properties window opens.
  6. In the Data tab, choose Field_Trips from the Content dropdown menu.
  7. Click on the ... button next to Link master fields. The Link Fields window opens.
    Under Field_Trips choose Date from the dropdown.
    Under Bird_Pictures choose DateTaken from the dropdown.
  8. Set Allow additions, Allow deletions, and Allow Deletions should all be set to no. (Obviously, if you were creating a subform for data entry, you would leave these set to yes.)
  9. In the General tab, give then form a more identifiable name. I chose FieldTripDates.
  10. Close the Form Properties
  11. In the Form Navigator window, make sure the subform (named FieldTripDates in our example) is selected
  12. Click on the More Controls button on the Form Controls Toolbar.
  13. In the More Controls window, click on the Table Control
  14. Click and drag on the form to draw the table. The Table Element Wizard - Field Selection window opens.
  15. In the Existing fields section of the {{Window|Table Element Wizard} window, select the following fields and then click the -> button after each selection to move them over to the Selected fields section.
    ID
    Date
    Location
    we are including the location field for those instances where more than one field trip occurred on the same date.
  16. Click on the Finish button.
  17. Adjust the column widths and properties as desired.
    To adjust properties, control-click on a column header and choose Column from the contextual menu.
Personal tools