Database

M

Mary

Hi,

I have created an access database that keeps track of
equipment. The database works great but I have forgotten
to incorporate a certain part.

When I delete a record it deletes it from the table which
is fine but is there any way that when it delete's the
record could it somehow store this record into another
table or a document called deleted records. That way I
have something to reference in case I need to now what
happened to a piece of equipment and I can't find it in
the database.

Is this possible, or anything like this?

Thanks...
 
R

Rick B

Why delete it? Just add an "inactive" field and check it to deactivate an
item. Then, in all of your queries, only pull items that are active.

You could even have the date, time, and userid posted to a field when the
"inactive" box is checked. Or require the user to enter a note.

Rick B
 
G

Guest

How do you have the date, time, and userid posted to a
field when the "inactive" box is checked? or have the
user to enter a note. Would you do this in your table, and
have a form come up requesting the information then store
it in your table?

Or is there a simpler way of doing this?
 
R

Rick B

I would add fields to my table to track this. Maybe fields like...

INACTIVE (check)
INACDATE (date/time)
INACUSER (character)
etc.

Then in your form, add the new checkbox to inactivate the part. You can
also add the two other fields near the checkbox and lock them so the user
can't make any changes to them. You could even make them invisible if you'd
like. Put code behind that field so that if the user checks it, the code
will fire. Have the code do something like...

Me!InacDate=Now()
Me!InacUser-CurrentUser()

There are many ways to do what you want, but this seems the easiest, and
could be invisible to the users.

You may want to add a toggle button to the form that would apply filters so
you could see active records, or inactive records by toggling the button.

Hope that gets you going.

Rick B
 
P

ProfWdesk1

Or, Create a separte Database that keeps a history. Roy, (e-mail address removed)
 

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