KC wrote:
Hello,
I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB.
I have tweaked this DB to work for our small co. It has worked pretty
well up until I made the mistake of deleting about 80 records from the
Orders table. 80 out of a 1000 records.
Now our data entry form shows our customer addresses, but not customer
order history. When looking at all of the tables, customer, payments,
orders, they still have all of the current data. I tried putting the
deleted records back, but this had no effect on the form, it's still
1/2way blank.
What did I do? What can I do to fix? I am not a programmer and this
has worked fine for us that last few years. Anyone's help would be
appreciated.
Thanks,
Kim.
Access is a relational database. That means there is a relation between
different
types of records. In your case there is a relationship (by using the
order number) ,
between the order records and the payments or any other records that
have a child
relationship to the order. Just as the order records is a child records
of the customer.
It looks to me that the database was not setup with "Enforce Referential
Integrity" enabled.
By enforcing referential integrity, when an order record is deleted, all
of the payment and any
other child records are also deleted.
Whe you design a Form using SubForms, There are properties on the
SubForm that allow
you to tell Access what the relationship will be beetwen the Form
(Parent), and the SubForm
(Child). They are "Link Child Fields" and "Link Master Fields". By
deleting the order records
there is not relationship of the existing payemnt records to the
customer. This may be why
the records do not display when you show a given customer record.
I don't know why the records don't re-display when you put the order
records back The only
thing I can think of is... you didn't put them back correctly. You
need to look at the record
source of the Form and SubForm to see if there is any other data that is
required or not required
allowing the records to be displayed. The record source may be a
query. If so, there is criteria
set in the query that will tell the SubForm(s) which records to display
when a given
customer record is in the main Form.
You should always do backups before doing anything major to your
database. Also,
you should be doing backups on a schedule in the event your database is
lost. Then
you can recover it back to some point in time. Could be a day, week, or
a month.
This depends upon the application and your company's accounting policy.
Some backup
weekly and also an end-of-month back. This will give you 5 backups each
month.
1 for each week and 1 for each month as a example.
Hope This Helps.
Ron
--
Ronald W. Roberts
Roberts Communication
rw*@robcom.com