Creating a form can save you a lot of time in the long run because it makes it easier
to input the data into one or more tables.
And in this video, we're just going to go over the basics of creating a form from a
table, adding additional fields, and inserting a drop-down menu into the form.
In the Navigation pane, you'll need to select the table that you want to use.
And you don't need to open it—just make sure that the name is highlighted.
I'm using the Customers table.
Then in the Create tab… you can click the Form command… and it will create a new form
that contains all of the fields from your table.
Before you do anything else, you should save this form.
I'll call it Customers Form.
Sometimes your form will include a subform.
Access will create one of these if your table is linked to another table.
For example, here, our Customers table is linked to the Orders table.
So this subform will include a list of any orders that the customer has placed.
In many cases, this may be useful.
But if you don't need the subform, you can delete it by just clicking on it… and pressing
the Delete key.
Now if we later decided to add a field to the Customers table, it would not appear automatically
in this form, so we would need to add it manually.
To do this, you can select Add Existing Fields from the Design tab… and this will open
up the Field List, which shows all of the fields from this table.
You can just double-click a field to add it to the form.
Or, if you want to add a field from a different table, click Show all tables… and then locate
the table and field that you want.
But for now, we have all of the fields that we need, so I'm just going to close this pane.
With some fields, you may want to add a drop-down menu, which Access calls a combo box.
This can make the form easier to use because the user can just click on the value that
they want.
I'm going to create a combo box for the Add to Mailing List field.
In the Design tab, find the Controls group… and select the Combo Box command.
Then you can just click on the form where you want it to go.
The Combo Box Wizard will open up.
And if you have a long list of values, you can click the first option to pull the values
from a table or a query.
But I'm going to select the second option, so that I can type in the exact values that
I want.
Here you can type in each value… and in most cases, you'll just use the first column.
I'm typing three different values, and I'm pressing the tab key after each one to go
to the next row.
And if you need to, you can adjust the width of the column.
And then click Next.
Now this next step is very important.
When the user chooses a value from the combo box, we want the value to be stored in the
Customers table.
We'll need to select the second option… and pick the field that we want.
In this case, our combo box is going to be asking about the mailing list, so I'll choose
the Add to Mailing List field.
And then in the last step, you can type a label.
I'm going to call it "Add to Mailing List?"
And click Finish.
The combo box will appear here.
And we don't need the original field anymore, so we can delete it.
To test the combo box, we can switch to Form view… and you can see that our three options
appear here.
So now we have a working form, and in the next couple of videos we're going to make
some more adjustments to it to make it better suit our needs.