How can I backup some records in an related table?

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
 
T

Tom van Stiphout

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.
 
A

along.hu

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!
 

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