How can I backup some records in an related table?

  • Thread starter Thread starter along.hu
  • Start date Start date
A

along.hu

Hi,

For an Access invoice db I've an an invoice_items table and an items
table. When a new invoice will be created, the invoice_items table
will be filled with item numbers from the items table. An invoice can
be printed based on the invoice_items table that is related with the
items table. So, not only the item numbers will be printed, but also
the item description and other information from the items table. But
the problem is that the records in the items table can change or be
deleted. So if that is the case the information in the invoice_items
table will be changed or deleted too. That is not what I want. The
information in the invoice_items table may not be changed. What is the
best way to do this?

Thank you

Tim
 
On Thu, 15 May 2008 20:13:23 -0700 (PDT), (e-mail address removed) wrote:

Referential Integrity is the best way to prevent needed records from
being deleted. Link the tables in the Relationships window, and
enforce the relationship. This is RDBMS 101.

Values that can change, e.g. Items.Price, need to be handled by
storing the price on that day in the invoice_items table.

-Tom.
 
On Thu, 15 May 2008 20:13:23 -0700 (PDT), (e-mail address removed) wrote:

Referential Integrity is the best way to prevent needed records from
being deleted. Link the tables in the Relationships window, and
enforce the relationship. This is RDBMS 101.

Values that can change, e.g. Items.Price, need to be handled by
storing the price on that day in the invoice_items table.

-Tom.







- Show quoted text -

It works, thank you Tom!
 
Back
Top