source from 2 tables

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hello,

I have 2 tables
1- clients (PK autonumber)
2- ditributors (PK autonumber)

I now have a form which track sales (thus a sales table). I need to be able
to select from both clients and distributors. Is there any way to union the
two. My issue is that both PK are autonumber so duplication is bound to
occur.... so how can I get this to work? How should I proceed oh database
gurus?!

Thank you as always,

Daniel P
 
I didn't properly explain myself.... here are more details.

The on the sales form, I enter the date of the sale and then have a cbo to
associate which client made the purchase. The issue is that we now have to
also include the distributors in that same list with the clients and I do
not know how to proceed.

Thank you once again!

Daniel P
 
I would have distributors and clients in the same table (tblPurchasers ?).

Have a Yes/No field in the table to indicate whether the purchaser is a
distributor and to let you
easily filter for clients or distributors when necessary

HTH
 
I had a feeling that would be the route to take.

Are there any other alternative to combining the info into one table?

Daniel
 
Why would combining the tables be a problem for you?

If you don't combine the tables then what field in your sales table would
you bind the combo to?

You could combine the values of the distributors and clients tables as a
rowsource for the combo using a UNION query, but if the combo is bound
(which I presume it is) then what would be the bound column? It couldn't be
the PK. You would have to either use the distributor/client name column
which would be inefficient and against normalisation principles or create
another column in your combo rowsource query which you could do but what's
the point?

HTH
 
Thanks Jon!
Why would combining the tables be a problem for you?

If you don't combine the tables then what field in your sales table would
you bind the combo to?

You could combine the values of the distributors and clients tables as a
rowsource for the combo using a UNION query, but if the combo is bound
(which I presume it is) then what would be the bound column? It couldn't
be the PK. You would have to either use the distributor/client name
column which would be inefficient and against normalisation principles or
create another column in your combo rowsource query which you could do but
what's the point?

HTH
 

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