If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Subforms problem
I have a main form with two separate subforms.
One subform holds branch address info and the other subform holds logged queries associated with each branch address. When I change from one branch ID to another, the info in the queries subform doesn't match up. An earlier incarnation of my DB did have one subform inside the other but it looked too confusing. help! |
#2
|
|||
|
|||
Subforms problem
Scubadiver,
Two subforms on a main form cannot be linked directly. One choice is to insert one as a subform on the other. The drawback to this is that you can't insert a continuous subform on another subform. The solution is to place an unbound textbox, usually hidden, on the main form, set its ControlSource to the primary key of the first subform, and link your second subform to it. Assuming the list of queries table or query has a BranchID field that you can link by, set the following: ControlSource Expression: =[FirstSubform].Form![BranchIDControl] Place the second subform on the main form, and set its LinkMasterFields to the name of the textbox, and the LinkChildFields to BranchID. Hope that helps. Sprinks "scubadiver" wrote: I have a main form with two separate subforms. One subform holds branch address info and the other subform holds logged queries associated with each branch address. When I change from one branch ID to another, the info in the queries subform doesn't match up. An earlier incarnation of my DB did have one subform inside the other but it looked too confusing. help! |
#3
|
|||
|
|||
Subforms problem
thanks. It seems to have worked.
I tried doing this before but changed the design to put one form inside the other. I then decided that it looked too messy! "Sprinks" wrote: Scubadiver, Two subforms on a main form cannot be linked directly. One choice is to insert one as a subform on the other. The drawback to this is that you can't insert a continuous subform on another subform. The solution is to place an unbound textbox, usually hidden, on the main form, set its ControlSource to the primary key of the first subform, and link your second subform to it. Assuming the list of queries table or query has a BranchID field that you can link by, set the following: ControlSource Expression: =[FirstSubform].Form![BranchIDControl] Place the second subform on the main form, and set its LinkMasterFields to the name of the textbox, and the LinkChildFields to BranchID. Hope that helps. Sprinks "scubadiver" wrote: I have a main form with two separate subforms. One subform holds branch address info and the other subform holds logged queries associated with each branch address. When I change from one branch ID to another, the info in the queries subform doesn't match up. An earlier incarnation of my DB did have one subform inside the other but it looked too confusing. help! |
Thread Tools | |
Display Modes | |
|
|