T
Toxalot
Access 2003
User can choose options in a form to generate a report based on
specific criteria. Originally, user was required to choose one book
and one profile type and could choose one province if desired. I have
this working using a where clause in the DoCmd.OpenReport. But now
user is requesting many more choices and I just can't seem to wrap my
head around it.
Listed below are the applicable tables narrowed down to just the
applicable fields. PK designates the primary key and in the case of
tblProfilePeople it is the combination of two fields.
tblCompanies
lngCompanyId (PK)
txtCompanyName
txtProvinceCode
tblProfiles
lngProfileId (PK)
lngCompanyId
intBookId
intProfileTypeId
tblProfilePeople
lngProfileId (PK)
intRoldId (PK)
lngPersonId
tblCompanyPeople
lngPersonId (PK)
txtFirstName
txtLastName
User must choose intBookId and intProfileTypeId.
User wants to have any combination of the following options:
- one txtProvinceCode
- NOT multiple intBookId
- blnAdvertiser = True
- multiple intPersonId
- sort by txtCompanyName or txtProvinceCode
The result must be unique lngProfileId, lngPersonId
Each company has multiple profiles. Each company has multiple people,
but the same person may fill multiple roles.
I think one thing that is stumping me is finding companies that are in
a specific book and also not in another specific book. I can build two
separate queries and then find the unmatched records, but how do I
allow the user to choose the books?
Am I going to have to generate several temp tables or is there another
way I am not seeing?
Jennifer
User can choose options in a form to generate a report based on
specific criteria. Originally, user was required to choose one book
and one profile type and could choose one province if desired. I have
this working using a where clause in the DoCmd.OpenReport. But now
user is requesting many more choices and I just can't seem to wrap my
head around it.
Listed below are the applicable tables narrowed down to just the
applicable fields. PK designates the primary key and in the case of
tblProfilePeople it is the combination of two fields.
tblCompanies
lngCompanyId (PK)
txtCompanyName
txtProvinceCode
tblProfiles
lngProfileId (PK)
lngCompanyId
intBookId
intProfileTypeId
tblProfilePeople
lngProfileId (PK)
intRoldId (PK)
lngPersonId
tblCompanyPeople
lngPersonId (PK)
txtFirstName
txtLastName
User must choose intBookId and intProfileTypeId.
User wants to have any combination of the following options:
- one txtProvinceCode
- NOT multiple intBookId
- blnAdvertiser = True
- multiple intPersonId
- sort by txtCompanyName or txtProvinceCode
The result must be unique lngProfileId, lngPersonId
Each company has multiple profiles. Each company has multiple people,
but the same person may fill multiple roles.
I think one thing that is stumping me is finding companies that are in
a specific book and also not in another specific book. I can build two
separate queries and then find the unmatched records, but how do I
allow the user to choose the books?
Am I going to have to generate several temp tables or is there another
way I am not seeing?
Jennifer