Pop Up selection choices

G

Guest

Hi - so far today (first day with access 2003) I created a table -
customerID...then created a form...customerID and made the layout the way I
want it to look.


Now I am working with the fields... I have all the numbers formatted

My problem is with fields that I want people to select an option from a list
of choices. I have made the text fields list boxes...but I don't know how to
use them.

I don't want them to auto populate with any value, but when you click on it
I want a list of choices to pop up that will eliminate people from mistyping
the values that I will want to search by later.

So can someone explain in laymans terms how to make pop up or drop
downs...not sure what they are called work like this?? I am happy to send
the file if need be for someone to look at it and tell me what I am doing
wrong.

Thank you in advance...
 
C

Carl Rapson

Confuzed_Newbie said:
Hi - so far today (first day with access 2003) I created a table -
customerID...then created a form...customerID and made the layout the way
I
want it to look.


Now I am working with the fields... I have all the numbers formatted

My problem is with fields that I want people to select an option from a
list
of choices. I have made the text fields list boxes...but I don't know how
to
use them.

I don't want them to auto populate with any value, but when you click on
it
I want a list of choices to pop up that will eliminate people from
mistyping
the values that I will want to search by later.

So can someone explain in laymans terms how to make pop up or drop
downs...not sure what they are called work like this?? I am happy to send
the file if need be for someone to look at it and tell me what I am doing
wrong.

Thank you in advance...

What you are thinking of is a combo box, not a list box. If you bind your
text fields to combo boxes, you will get the "pop up" effect you're wanting
(if I understand you correctly).

The question you have to answer is, what will populate the list of choices
in the combo box? There are two aspects to a combo box control - the field
it is bound to and its Row Source. The bound field is the field in the
underlying table that will be updated when you make a selection in the combo
box. The Row Source defines the list of items the user sees when he opens
the combo box.

What will be the source of the items in the list? Another table, or a static
(fixed) list? If you want to use another table as the source of the items in
the list, you'll set the Row Source Type property of the combo box to
Table/Query and the Row Source property to the table or query that the list
comes from. If you want to "hard code" the list of items, set the Row Source
Type property to Value List and enter your list of items in the Row Source
property. If you want the user to be limited to selecting only the items in
the list (not able to add a new value), be sure to set the combo box's Limit
To List property to Yes.

If you use the wizard to create the combo box, a lot of the work described
above will be done for you. Hopefully this will be enough to get you
started. Access help has a lot of information about combo boxes and their
various properties. You can also post back here when you have more specific
questions.

Carl Rapson
 
G

Guest

Newbie,

You need to create a new table in your database for what most people
consider to be lookup values. I'll explain my method, and others can explain
theirs.

Generally, numbers take up less space in your database than text. So I will
generally store a numeric value in my main table that points to a text value
in another table. An example of this might be cities if you are building an
employee database and have employees in multiple locations.

I would create a City field in my Employee table, and define it as a long
integer datatype.

Then, I would create a table (tbl_lookup_Cities) that would contain a
City_ID field declared as an autonumber datatype and a City_Name and
City_State text fields. I would then populate this table with all of the
cities you need to display on your main form.

Once I had this done, I would go back to my main form, select the combo box
that I want to use to display the City information and set the Row Source
(this can be found on the Data tab of the properties window) of the combo box
to tbl_local_Cities. While on that tab, I would set the Control source of
the combo box as the City field. and would change the Limit To List property
to Yes.

Next, I would go to the format tab of the properties window (still focused
on the Cities combo box) and change the number of colums from 1 to 3, and
then set the column widths to: 0; 2; 1 or something like that. This will
hide the City_ID field from view and make the city and state columns visible
when you drop down the selection.

HTH
Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top