Access 2010 combo box

I've inherited a rudimentary database which many issues. One of the things that is bothering me is that I am working with a CURRENT STATUS combobox lookup comprised of First Names of some of the staff who work with clients plus the value "Closed". So when there are staffing changes, the Current Status table values have to be updated and currently do not link to the employee table. I would like to populate this lookup from the Employee table but how would I do that and also include the "Closed" value in the cbobox? This is not something I've had to do before
Joanne BaileyDatabase AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
So the solution would be to link the Employee table to the Current Status and checkmodify the combobox accordingly...It would be most helpful if you share a sample of this database..
0
Joanne BaileyDatabase AdministratorAuthor Commented:
Hi John. I am trying to get away from having a separate Current Status table since I think the values should come from tblEmployee where CurrentStatus (Y/N) permission = True. I recall there is a way to do this using a union query but have not used union queries before. I can't attach the database (due to confidentiality agreeement) but I can tell you that I am simply trying to populate a combo box on a form which is bound to the CurrentStatus field in tblCase with First Names from tblEmployee where CurrentStatus is True and also offer the value "Closed" in the pick-list, Hope that makes sense.
0
Jeffrey CoachmanMIS LiasonCommented:
Then post a simplified example of the database with generic data, ...just to illustrate the issue..

Remember, without a full understanding of the design, ...we are limited to what we can propose as an "answer"

For example,
...it is no clear how a status of "closed" relates to the employee and the clients,...and under what conditions is it "Closed" or "Open"?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Fabrice LambertFabrice LambertCommented:
Hi,
try with the following query in the combo box's rowSource:
SELECT [First Names]
FROM tblEmployee
WHERE CurrentStatus = True
GROUP BY [First Names]
UNION
SELECT DISTINCT "Closed"
FROM tblEmployee

Open in new window

In fact, the table in the 2nd query doesn't matter since you arn't pulling data from it, but Access require it (duh !).
This is why the DISTINCT statement is required, to avoid duplicate results.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
It would appear that you have a design issue. You are using one field to hold two attributes Open/Closed and a person's name.  It would be better to fix the underlying problem and use two fields. Your status values, assuming they are pretty static, can be a value list.  Then the second combo can pick an employee.
0
Joanne BaileyDatabase AdministratorAuthor Commented:
Thank you Fabrice, that is exactly what I was looking for. Seems so simple now. Also understand and agree with Pat but "Current Status" is not an accurate label/field name. This field is used to show who is looking after the file now. And the client wants "Closed" to appear in the list. Thank you everyone for your assistance.
0
PatHartmanCommented:
Yes, you can add "Closed" to the list as Fabrice suggested but it prevents you from using RI.  It would be better to add "Closed" as an employee.  But using the field for two purposes is still WRONG and that is what should be fixed.
0
Fabrice LambertFabrice LambertCommented:
Solution accepted, but the original poster did not gave credits
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.