Combobox based on yes/no check marks

luism

Registered User.
Local time
Today, 03:54
Joined
Sep 30, 2012
Messages
43
I have a table of Employees, tbl_Emps with some basic info, FName, LName, HomePhone, CellPhone and I'm thinking of adding a Active [Yes/No] checkbox.

Will I be able to populate a combobox based on Active/Inactive Employees?

In addition, I would also like to tell a report to print a list of Active/Inactive employees.

Any help is greatly appreciated!
 
Check boxes store their results as 0 for Unchecked and -1 for Checked. You can test for check using -1, True and "Yes" whilst unchecked would be 0, False and "No". Note that Yes and No must be enclosed in double quotes whilst True/False does not.

So you could quiet easily display those results in combo with the right adjustments to the Row Source.

And you should have no problems in identifying active records for your Report.
 
could you please guide me? maybe an example?

i tried on my own but couldn't get any results.

thank you!
 
Not necessarily, my Tbl_Emps has a few inactive Employees. What I'm trying to do is create a combo box on another form that populates a list of all Active employees only. How can I do this, on another form?

I understand how you did yours but it doesn't help me with populating a list of Active employees on another form.

Which also means I'm not sure on how to print a list of all active employees. Or even inactive if I'd like that choice.
 
So long as you can reference your table from the other form, and I see no reason you can't, then you simply use the method I demonstrated in the sample.
 
My row source is grabbing EmpID of all active/inactive Employees as well as their FName and LName, I dont know how to implement into the query how to grab only those Employees that are active.
 
With your form in design view click on your Combo Box, from the properties window select the Data tab, and click on the Row Source row, now click on the Ellipsis button;

attachment.php


This will open up a query builder window, from there you can adjust the Row Source to select the data you need to display ion your Combo.
 

Attachments

  • Capture.PNG
    Capture.PNG
    54.3 KB · Views: 455

Users who are viewing this thread

Back
Top Bottom