Question??

P

Paul

I have an Access application which was splitted into front-end and back-end
design. The back-end of it is installed on a server. Recently end-users
complained that records dissappeared from the application. I did some
trouble-shooting on the front-end and found no fault in the design that will
delete data from the table. I wonder if it is possible to track any records
deleting from the back-end and perhaps have a log table to store some
information in it. I want to track the date and time and user name in that
table. The appliaction was designed for the Order Entry which has the
Product table, Order table and Order Details table and several lookup
tables. Order and Order Details are in one to many relationship with cascade
update and delete i.e. when user delete OrderID and it will delete all
related records from the Order Deatils table. Users said OrderID disappeared
with no reason and they did not deleted it themselves. Thanks.
 
A

Arvin Meyer

A good way to stop this is to stop all deletes. If the records are still
disapearing, you have a problem. My guess is that it will stop. First hide
the tables and the rest of the database window using the startup options.
Change all forms to not allow deletions. Add a Yes/No "Delete" field to each
table. Change the recordsource of the form to a query which shows only
records with the "Delete" field set to False. Then put a "Delete" button on
each form. Set the button's Tab stop property to No and write some code for
the "Delete" button like (air code):

Sub cmdDelete_Click(Cancel As Integer)
Me chkDelete = True
Me.Requery
End Sub

That will hide the record instead of deleting it. The next time a user
complains about a missing record, have a look at the ones marked True and
see if it isn't there. Dollars to donuts it is.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
K

Klatuu

Check for cascading deletes in your back end. If a user deleted a child
record ie an order and that order is related to your product table, it will
delete the order and the related row from the product table.
 
P

Pat Hartman

If you don't have RI enforced, records can "appear" to be deleted because
they end up with missing or invalid values in their foreign key fields.
Also, use LEFT joins in all queries against many-side tables that may not
contain a row for the one-side table.
 
Top