Automatically add new records to multiple tables?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to automatically add 1 record (with a default value of 0/not null) to
multiple related tables, easily done through say with a click of a command
button. Is this possible?

The purpose for this is to achieve a summary of totals for a specific set of
records from different tables, and I know I can do this using subforms,
however with about 6 tables there would just be too many subforms to be
placed in 1 form.
 
You can use a union query to achieve it

SELECT SUM(AMOUNTFIELD) FROM TABLE A
UNION ALL
SELECT SUM(AnotherAmountField) FROM TABLE B
.....

you must only make sure to have the same number of "compatible" fields in
each select

HTH

Pieter

BWN said:
I need to automatically add 1 record (with a default value of 0/not null)
to
multiple related tables, easily done through say with a click of a command
button. Is this possible?

The purpose for this is to achieve a summary of totals for a specific set
of
records from different tables, and I know I can do this using subforms,
however with about 6 tables there would just be too many subforms to be
placed in 1 form.



--
 

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

Back
Top