
Originally Posted by
LifeIsBeautiful
I would like to create 2 different parameter query's:
1) where if I type in an Individual's client number, all the businesses it owns will populate
2) where if I type in an Individual's client number all invoices associated with it PLUS all invoices associated with it's businesses will populate.
PLEASE HELP!
1)
Code:
select * from businesses
where clientnumber = [enter client number]
2)
Code:
select individuals.clientnumber, invoices.invoicenumber
from invoices innerjoin individuals on
individuals.clientnumber = invoices.clientnumber
where indiv.clientnumber = [enter client number]
that is not tested and is probably not 100% accurate. let the query grid build the joins for you, don't type them in.
and remember with parameters, you have to enter them into the query builder otherwise you'll get popup windows (I think). in design view of queries, there is always a button near the top called ''parameters''!