J
John D
My db has 5000 nonprofits. I have a Main Form [frmOrgMaster] with 6 subforms,
each on a tab. [frmOrgMaster] has 2 Combo Boxes. You select a County in the
first Combo Box [cboCounties]. The [cboCounties] AfterUpdate Event Procedure
then requeries the second Combo Box [cboOrgs] which produces a list of
nonprofits in that County - and you choose one of them.
The idea is to go through the two Combo Boxes, then view info about the
selected nonprofit on the 6 tabs - such as Key People, Locations, Services,
etc.
Here's how the Combo Boxes work -
I created a Query named qrycboOrgs that joins two Tables - tblOrgs and
tblCounties - and has these fields:
tblOrgs.OrgID
tblOrgs.OrgName
tblOrgs.CountyNum
tblCounties.CountyName
The two tables are joined on their common field - CountyNum(ber).
The two Combo Boxes have these Row Source properties:
cboCounties:
Row Source Type: Table/Query
Row Source:
SELECT DISTINCT qrycboOrgs.CountyName FROM qrycboOrgs;
cboOrgs:
Row Source Type: Table/Query
Row Source:
SELECT qrycboOrgs.OrgID, qrycboOrgs.OrgName
FROM qrycboOrgs
WHERE ((qrycboOrgs.CountyName) Like forms!OrgMaster!cboCounties)
ORDER BY qrycboOrgs.OrgName;
One subform is [frmsubOrgCorp] which is about corporate structure. It's data
comes from a query [qryCorpStatus] that has, among other fields - [OrgID] -
which is the the Link field. (The other 5 subforms have different queries but
all use OrgID as the Link field.)
Link Child and Master Fields for [fromsubOrgCorp] are set to [OrgID] - from
qrycboOrgs for the Master, and qryCorpStatus for the Child. However, after
the 2 Combo Boxes are selected, the subforms do not update to show info about
the nonprofit selected in cboOrgs (Combo Box 2).
The problem is that the value of OrgID in qrycboOrgs itself doesn't change
when the user selects the nonprofit in cboOrgs (Combo 2).
I think I should be linking with the OrgID value selected in Combo2, but
can't figure it out.
Can you tell me what I should do - thanks.
John D
each on a tab. [frmOrgMaster] has 2 Combo Boxes. You select a County in the
first Combo Box [cboCounties]. The [cboCounties] AfterUpdate Event Procedure
then requeries the second Combo Box [cboOrgs] which produces a list of
nonprofits in that County - and you choose one of them.
The idea is to go through the two Combo Boxes, then view info about the
selected nonprofit on the 6 tabs - such as Key People, Locations, Services,
etc.
Here's how the Combo Boxes work -
I created a Query named qrycboOrgs that joins two Tables - tblOrgs and
tblCounties - and has these fields:
tblOrgs.OrgID
tblOrgs.OrgName
tblOrgs.CountyNum
tblCounties.CountyName
The two tables are joined on their common field - CountyNum(ber).
The two Combo Boxes have these Row Source properties:
cboCounties:
Row Source Type: Table/Query
Row Source:
SELECT DISTINCT qrycboOrgs.CountyName FROM qrycboOrgs;
cboOrgs:
Row Source Type: Table/Query
Row Source:
SELECT qrycboOrgs.OrgID, qrycboOrgs.OrgName
FROM qrycboOrgs
WHERE ((qrycboOrgs.CountyName) Like forms!OrgMaster!cboCounties)
ORDER BY qrycboOrgs.OrgName;
One subform is [frmsubOrgCorp] which is about corporate structure. It's data
comes from a query [qryCorpStatus] that has, among other fields - [OrgID] -
which is the the Link field. (The other 5 subforms have different queries but
all use OrgID as the Link field.)
Link Child and Master Fields for [fromsubOrgCorp] are set to [OrgID] - from
qrycboOrgs for the Master, and qryCorpStatus for the Child. However, after
the 2 Combo Boxes are selected, the subforms do not update to show info about
the nonprofit selected in cboOrgs (Combo Box 2).
The problem is that the value of OrgID in qrycboOrgs itself doesn't change
when the user selects the nonprofit in cboOrgs (Combo 2).
I think I should be linking with the OrgID value selected in Combo2, but
can't figure it out.
Can you tell me what I should do - thanks.
John D