|
Creating a Form in Design View
From NeoWiki
We have used the wizard to create two forms. This time we will create the form "from scratch." You will need to have created the All Sightings query described in Using a Query to Combine Fields From Different Tables. For this form, our data will be displayed in a table or data sheet setup. But much the same process would be used for any type of form.
Contents |
Setting Up
- In the main database document window, click on the Form icon in the left hand column.
- Under Tasks, click on the Create Form in Design View icon.
- When the new form opens, make sure that the Form Controls toolbar is open. You can verify this by going to the View, choosing Toolbars and seeing if Form Controls is checked. If not, select it.
- If you would like to set a background color, like forms made with the wizard have, right-click or control-click anywhere on the form and choose Page.... (You could also go to the Format menu and choose Page... if you prefer)
- Click on the Background tab
- From the color palette, choose a pleasing color
- Click OK
Creating a Title
- Click on the Label button on the Form Controls Toolbar. (The button simply says ABC)
- Draw a label along the top of the form.
- Double Click the label
- In the General tab of the Properties: Label Field window, make the following changes
- for Name type Form Title
- for Label type List of Birds Seen
- Click on the ... button next to Font to set font, size, color, etc. as you desire
- Set Alignment to Center
- Close the Properties: Label Field window
Creating a Table Control
- Click on the More Controls button of the Form Controls toolbar. It looks like a sheet with a blue radio button and a blue oval button with a plus sign in the upper right hand corner. A floating palette will appear.
- Click on the Table Control button. It looks like a blue table or spreadsheet.
- Drag on the form to draw the table control. Leave some space between the label and the table control, as we will add other controls in later tutorials.
- Once you release the mouse or trackpad button, the Table Element Wizard window will open. On the first pane of the wizard, select the All Sightings query you created earlier from the Table/Query list.
- Click Next>>
- Now move all the fields into the Selected Fields column. If you are content with the order in the Existing Fields solumn, you can do this by simply clicking the =>> button. If you want a different order, move the fields one at a time by selecting the desired field and clicking the ->
- Click the Finish button.
- Adjust the placement and the size of the table control as needed.
Configuring Column Headings
- Click on the Design Mode On/Off button of the Form Controls toolbar (the blue drafting triangle). Take a look at the way the data is displayed, and what formatting elements need to be changed. (Fields not long enough, odd formatting, etc.). Make a mental or written note of these elements. The remaining instructions here are based on things I noticed.
- Click on the Design Mode On/Off to return to design view.
- Adjust Field lengths by placing your cursor on the border between two fields. When the cursor shifts to a vertical line with two arrows, click and drag to adjust the Field length.
- On my form, the ID field is formatted as a number with two decimal places. To fix this, right-click or control-click on the ID column header. Choose Column... from the contextual menu that appears.
- Set Name to ID Field or some other appropriate name
- Set Decimal Accuracy to 0.
- Set Value min to 0.
- To adjust the Date format, right-click or control-click on the Date column header. Choose Column... from the contextual menu that appears.
- Set the Date Format dropdown to the format you desire
- I noticed that the State or Province field name is too long compared to the two letter state abbreviation. To address this, right-click or control-click on the State or Province column header. Choose Column... from the contextual menu that appears.
- Change the Label entry to a shorter title. (I choose "State")
Note: While not needed for this form, you can also change control types by selecting the Replace with option that appears when control-clicking on a column header. See Creating A Combo Box in a Data Sheet Style Form.
Save the Form
Save the form by clicking on the Save button on the toolbar or by pressing Command-S. When asked for a name, name it All Sightings.
Close the All Sightings window by clicking on the little red button at the top left.
Next Steps
Filtering in Forms
Adding a Search Control to a Form