Delete records help

O

oxicottin

Hello, I have a table with expired employees records in it and I want to get
rid of those records. The problem is I have 9,000 records and cant go threw
them individually. I thought I had read that I can make a query to do this
for me but I dont know how. Can someone please explain to me in detail on how
to do this? Im a newbie be gentle.....

Thanks,
Chad
 
D

Dirk Goldgar

In
oxicottin said:
Hello, I have a table with expired employees records in it and I want
to get rid of those records. The problem is I have 9,000 records and
cant go threw them individually. I thought I had read that I can make
a query to do this for me but I dont know how. Can someone please
explain to me in detail on how to do this? Im a newbie be gentle.....

How do you know that a particular record is "expired"? If you were
looking at the record, what would tell you that?
 
C

Chad

I didnt mean the record was expired I ment the employe was expired.."Fired"
no longer wong for us ect.
 
D

Dirk Goldgar

In
Chad said:
I didnt mean the record was expired I ment the employe was
expired.."Fired" no longer wong for us ect.

The question still remains, with different wording: How can you tell
from the employee record that the employee has been terminated? Is
there a TerminationDate field, for example, that will be Null if the
employee hasn't been terminated? Or is there some Yes/No field that
will be True only if the employee has been terminated?

If there is some data value in some field that marks an employee as
terminated, then you can run a delete query to select all those records
and delete them. Or, a safer and often better alternative, you can
leave them on file but base all normal forms and reports on queries that
only return active employees, and exclude the terminated ones.
 
C

Chad

I have a main tbl that keeps all my data and in this table it has employees
names and some other info including dates ect. for that employee that I want
to get rid of. The reason I wnat to get rid of this is because when I run
reports it brings up un-needed information. Insted of going threw the tbl and
deleting rows that have the employees name in it I just wanted to know if
there was a way I could select everything that has that employees name in it
and delete the row that its in. I hope this help...Thanks!
 
D

Dirk Goldgar

In
Chad said:
I have a main tbl that keeps all my data and in this table it has
employees names and some other info including dates ect. for that
employee that I want to get rid of. The reason I wnat to get rid of
this is because when I run reports it brings up un-needed
information. Insted of going threw the tbl and deleting rows that
have the employees name in it I just wanted to know if there was a
way I could select everything that has that employees name in it and
delete the row that its in. I hope this help...Thanks!

I understand what you're trying to do, but I need very specific answers
to the questions I asked. In order to do this sort of thing
programmatically, the query must be able to look at the values in the
fields of an employee record and see from those values whether that
record should be deleted or not.

Please post the names of the main table your referred to, and the names
and data types of all the fields in that table. With that information,
I may be able to help you.
 
Top