How do you make a record in a table hidden?

B

buddycheck240

I'm not sure if this is possible, but I figured it was worth asking. I
created an Access database for an in-house PO system that everyone in
the organization uses. It works great. However, here is the issue I'm
having...

There is a table called "tblEmployee". In this table are the names of
everyone in the company that use the PO database. The form that
everyone uses pulls the names from tblEmployee into a combo box so the
end users can simply select their name from the list when creating a
new Purchase Order.

Since the time this database was created, numerous employees have come
and gone. It's easy enough to add new employees to this list. I just
add their name to the table. However, if I remove an employee's name
from the list, it also removes their name from EVERY purchase order
they've ever created, making it impossible to back-track who placed old
orders if they are no longer in the list. As a result, I have not
deleted anyone's name from tblEmployee, even if they do not work here
anymore. Their names still show up in the combo box in the form, but
at least we can still see who placed old orders.

My question: Is there a way to keep all the names in "tblEmployee" but
hide the records of employees that no longer work here so they do not
show up in the combo box?

Thanks very much in advance,
Buddy
 
R

Rick B

Sure. Add an "inactive" checkbox or date to the table. Then, when you
build your drop-down list, exclude terminated employees.
 
B

Bruce Rusk

- Add a yes/no field called "Inactive" to the Employees table.
- When an employee leaves, change this field to "true"
- Update the recordsource behind the combo box to pull up only the records
where "Inactive" is not true

Note: depending on the size of your employees table, this may slow down the
population of the combo box since the query has to check another criterion.

HTH,

Bruce
 

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