Limit to List property

I

iholder

How do you use the Limit to List property on a Combo Box

The list on the combo box is base on the category selected from the previous
combo box..

Example: The first combo box category selected is: "PPPD" the second combo
box list is:

fld1 fld2

PPPD - CITY
PPPD - STATE
AP - AGENCY
AP - DIPLOMAT
AP -HOSPITAL
AP - PRESS
PP - CLERGY
PP - EXPRESS
PP - HGWY TRAVEL

The second combo box list should only show [STATE] and [CITY] listed
 
J

Jeff Boyce

LimitToList prevents the adding of new values. Unless you tell Access that
the second combo box is based on the selection in the first, it won't know.

You could create a query to fill the second combo box, and, as a parameter,
use the value selected in the first combo box.

Check the mvps.org/access website for "Cascading Combo Boxes", or Google the
expression for more details.

Regards

Jeff Boyce
<Office/Access MVP>
 
I

iholder

Thank You very very much for the link. The code does exactly what I wanted.

Ileana


Ofer said:
This link will give you one example using code

http://www.databasedev.co.uk/filter_combo_boxes.html
===========================================
And this link will show you with the above option and another option, by
linking the row source of the second combo to the selection of the first one

http://www.mvps.org/access/forms/frm0028.htm

--
\\// Live Long and Prosper \\//
BS"D


iholder said:
How do you use the Limit to List property on a Combo Box

The list on the combo box is base on the category selected from the previous
combo box..

Example: The first combo box category selected is: "PPPD" the second combo
box list is:

fld1 fld2

PPPD - CITY
PPPD - STATE
AP - AGENCY
AP - DIPLOMAT
AP -HOSPITAL
AP - PRESS
PP - CLERGY
PP - EXPRESS
PP - HGWY TRAVEL

The second combo box list should only show [STATE] and [CITY] listed
 
Top