Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting records in combo box

Status
Not open for further replies.

benesch

Technical User
Apr 19, 2001
18
0
0
US
I have designed a form, the purpose of which is to select long-term care facilities by category. This form contains the following objects:

1) An unbound combo box used to select facilities by name. As the form stands at present, all facilities appear in this combo box, sorted alphabetically in ascending order.
2) An option group with twelve (12) toggle buttons, one to filter each of the eleven (11) categories of facilities, the twelfth toggle button is used to select all records.
3) Facility name, address, category, and contact information.

Does anyone know of a way, when one of the eleven toggle buttons is selected, to either

1) Display only the currently filtered records in the combo box, or
2) Show the currently filtered records first in the combo box.

Thank you in advance for any help that you can offer.
 
It might be easier to make your catagories a combobox as well. If you did that you could do something like the following in the After Update event for the Catagories control:

If cboCatagories = 0 Then
strSQL = "Select etc From tblFacilities Order By, etc"
Else
strSQL = "As above Where Catagory = " & cboCatagories
End If

cboFacilities.RowSource = strSQL

You can test this type of thing by using DoCmd.RunSQL strSQL

If you really need to put the selected category first and have the rest follow afterward, post it and I'll try to help you.

Good Luck!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top