all data from two tables

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I have two tables.
Table1
Products
Distributors
Credit

Table2
Products
Distributors
Debit

Before we resolved the problem to get all Products and
Distributores from Table1 and matched ones from Table2 to
get [Credit]-[Debit].

But, I've just known that some distributors from Table2
may not match with Table1. But, I need them all with minus
[Debit].
I'm thinking to create qry1 to get and group all products
and distributors from Table1 and do the same as qry2 with
Table2 assigning minus to [Debit]. Then, create union qry
grouping Products and Distributors, and naming Credit and
Debit as one column and Sum it.

Please, advise if it's a good approach for this case.

Thanks in advance.
 
I would put all transactions in ONE table and indicate in a separate field
whether it is a credit or debit. Or, simply enter positive and negative
numbers. Why do you want credits and debits in a separate table?

Rick B


I have two tables.
Table1
Products
Distributors
Credit

Table2
Products
Distributors
Debit

Before we resolved the problem to get all Products and
Distributores from Table1 and matched ones from Table2 to
get [Credit]-[Debit].

But, I've just known that some distributors from Table2
may not match with Table1. But, I need them all with minus
[Debit].
I'm thinking to create qry1 to get and group all products
and distributors from Table1 and do the same as qry2 with
Table2 assigning minus to [Debit]. Then, create union qry
grouping Products and Distributors, and naming Credit and
Debit as one column and Sum it.

Please, advise if it's a good approach for this case.

Thanks in advance.
 
It would be great. But, the thing is these two separate
tables have already existed. I can just use them.
 
I would recommend combining both to a four field table.
I'm sure your accountant would tell you to keep Debits
and Credits as separate fields as well.

Gymbolaya
MVP wannabe
 
Back
Top