a query to populate a sub-form from 2 possible data sources

techexpressinc

Registered User.
Local time
Today, 06:11
Joined
Nov 26, 2008
Messages
185
I need my data to fill the sub-form come from one of two possible inputs based on plan-id. I am not clear on how to select the data to fill the sub-form.

There is the main form with data from DB-A, then there is a sub-form that needs filled with data from DB-B or DB-C, based on the key planid that is on DB-A.

How would get the sub-form's data to come from DB-B or DB-C. I could do it field by field; like this:

Inputs:
1) DB-A (main form DB)
2) DB-B (query brings in all fields with PLANid in a where parameter)
3) DB-C (query brings in all fields with PLANid in a where parameter)
Output:
1) Formusedfields: data going to the sub-form

I could see this working on the sub-form each screen field:
FormusedEmployer-Name:IIF(DB-A.MAIN[Planid]=qDB-B[PlanID],qDB-B[Employer-Name,qDB-C[Employer-Name])


But i want a selection up front of DB-B or DB-C, not If-s per field.
Any good approach ideas??

Thx
Russ
 

Users who are viewing this thread

Back
Top Bottom