Limit content of Combo Box

  • Thread starter Jeffrey O'Donnell via AccessMonster.com
  • Start date
J

Jeffrey O'Donnell via AccessMonster.com

I have an Employee Evaluation Reports form that lists the employee's personal data, location, section, and various dates.
For ease of input, I've added a combo box for the employee's Rater and
Reviewer.
At present, the combo box (cboRater)is bound to tblRaters which is generated from tblEmployee, so all the Company's employee names appear in the combo box. - Not good.
I'd like to limit the names that appear in the Rater combo box
based upon the Section field of the employee record. But the twist is, not just matching the Section field. I'd like to include one or two other possible Section field options (e.g. the Rater combo box for an employee working in the HR section should only display names that are either in HR or Management.)
I can do this query manually. How do I get the form to do this automatically?
 
R

rkc

Jeffrey said:
I have an Employee Evaluation Reports form that lists the employee's personal data, location, section, and various dates.
For ease of input, I've added a combo box for the employee's Rater and
Reviewer.
At present, the combo box (cboRater)is bound to tblRaters which is generated from tblEmployee, so all the Company's employee names appear in the combo box. - Not good.
I'd like to limit the names that appear in the Rater combo box
based upon the Section field of the employee record. But the twist is, not just matching the Section field. I'd like to include one or two other possible Section field options (e.g. the Rater combo box for an employee working in the HR section should only display names that are either in HR or Management.)
I can do this query manually. How do I get the form to do this automatically?

The most basic way of doing this is to create a saved query that uses
controls on the form for criteria. Set the combobox recordsource to
the saved query. If the number of fields used as criteria changes with
employee type then you could create more than one saved query and use
logic in the form's current event to set the combobox recordsource.
 

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