Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access forms

ResolvedVersion 2003

Lizanne has attended:
Access Intermediate course

Access Forms

How do I create a drop down bar for options within a form ?
Thank you

RE: Access Forms

Hi Lizanne, Thank you for your post, welcome to the forum, I hope you enjoyed your course. In answer to your question; I am assuming that you mean a Combo Box control on your form; if so;
A combo box comprises a drop down list of items, yusually bound to an underlying field, from which one entry can be selected. The advantages of using a combo box are:
The list will only display existing values in that field
There is less danger of data being misspelt or inaccurate because it is chosen from a list
The combo box takes up less space on a form than a static list.
To create a combo box using a wizard:
1. Ensure that the Control Wizards button in the toolbox is depressed.
2. Click on the Combo Box button in the toolbox
3. Click on the form to add the combo box to it.
4. Follow the steps displayed by the wizard to create the combo box.
To create a combo box manually:
1. Ensure that the Control Wizards button is not depressed.
2. Click on the Combo Box button on the toolbar
3. Add the Combo box to the form.
4. Set the properties of the combo box as required - select the combo box and click on the Properties button, or right click on it and choose Properties
The five most important properties of a combo box are listed below:
Control Source: Defines the name of the field in the underlying table or query that will be updated by the combo box.
Row Source: Defines the table or query that supplies data used to create the list
Row Source Type: Defines the source type for the list. This can be Table/Query, Value List or Field List
Bound Column: Defines which of the columns used in the combo box returns its value to the Control Source.
At this stage, change to Form View and test that the combo box is working, If it will not let you select an item from the list, the most likely reason is that you have got the Row Source and Control Source properties reversed. I hope that has helped you, if so please click the Resolved link, Best Regards Pete Emmerson Microsoft Office Specialist Master Instructor

Access tip:

Calculating The Difference Between Dates

If you wish to calculate the time between two date fields, this can be done in a number of ways:

1. As a calculated field in a query
2. As a calculated control in a form or report
3. As a calculation in a VBA procedure.

The basic syntax to get the number of days between two dates is:

=[One Date Field] - [Another Date Field]

You can also use one of the following functions:

=Month([One Date Field] - [Another Date Field])
which calculates the number of months between the two fields

=Year([One Date Field] - [Another Date Field])
which calculates the number of years between the two fields.

Another function is the DateDiff() function.

It uses an argument to determine how the time interval is measured. For example:

=DateDiff("q",[One Date Field] - [Another Date Field])
returns the number of quarters between the two fields.

Other intervals that can be used in this expression are as follows:
"yyyy" - Years
"m" - Months
"d" - Days
"w" - Weekdays
"ww" - Weeks
"h" - Hours
"n" - Minutes
"s" - Seconds

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.