Combo Based on a Combo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have built a form that a user can use to evaluate risk. I have several
queries and reports that work well when the user types in different risk
score ranges. What I would like to do is build a combo box that has five
entries. Very High Risk, High Risk, Medium Risk, Low Risk, and All Scores.
Based on a selection in that box I would like a range of scores input into
the scores field in my query that drives my report. For instance, Low Risk
would display branches with score between 100 and 90, Medium would be 89 to
80, and so on. I have tried to use a query based on a table that list a high
and low score for each risk range. Very High Risk has a high score of 69 and
a low of 0. I then tried to build to two combo boxes based on a query from
that table, with the risk range combo as a criteria. In thery this should
work, but for some reason my score range combo will not work. I either get
the Name# error or it completely ignores my selection for the risk range.
Does anyone have any ideas?
 
Check this link on "How can I filter one Microsoft Access combobox based on
another combobox selection"

http://www.databasedev.co.uk/filter_combo_boxes.html

===================================
Another way, which I rather because there less code involved

Create a reference in the combo RowSource to the field in the form

Select ID, data1, data From TableName Where data1 =
Forms![FormName]![TextBoxName]

On the after update event of the text box, you need to run the code
Me.[Combo name].Requery
 
Back
Top