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
|
|||
|
|||
Requery
Does anyone know how to requery multiple layers of subform.
- First, I have a main form which has a subform_1. - Then, when action is taken on subform_1, I need to refresh a field on subform_2 (child of subform_1). - Lastly, when action is taken on subform_2, I need to refresh a field on subform_3 (child of subform_2). Thanks, Joe |
#2
|
|||
|
|||
Requery
On my website (see sig below) is a small sample database called
"SubformReference.mdb" which illustrates this and many other issues with referencing subforms. -- --Roger Carlson www.rogersaccesslibrary.com Reply to: Roger dot Carlson at Spectrum-Health dot Org "Joe" wrote in message ... Does anyone know how to requery multiple layers of subform. - First, I have a main form which has a subform_1. - Then, when action is taken on subform_1, I need to refresh a field on subform_2 (child of subform_1). - Lastly, when action is taken on subform_2, I need to refresh a field on subform_3 (child of subform_2). Thanks, Joe |
#3
|
|||
|
|||
Requery
Roger:
Wow this is super... unfortunately, your forms/subforms is way too difficult for me to understand. I have spend now days on this problem and I'm still getting ahead w/ a solution for my particular scenario. I use combo boxes in the subforms and want to make sure I can refresh subordinate combo boxes after the parent combo has changed. Do you mind providing me any pointers how to do that? Please keep it simple though. Joe "Roger Carlson" wrote in message ... On my website (see sig below) is a small sample database called "SubformReference.mdb" which illustrates this and many other issues with referencing subforms. -- --Roger Carlson www.rogersaccesslibrary.com Reply to: Roger dot Carlson at Spectrum-Health dot Org "Joe" wrote in message ... Does anyone know how to requery multiple layers of subform. - First, I have a main form which has a subform_1. - Then, when action is taken on subform_1, I need to refresh a field on subform_2 (child of subform_1). - Lastly, when action is taken on subform_2, I need to refresh a field on subform_3 (child of subform_2). Thanks, Joe |
#4
|
|||
|
|||
Requery
The reason I created the sample is because it gives a frame of reference for
the examples. Go back and read the Explanation and More Explanation and try to trace what some of the buttons do. This will help you far more than if I just give you the code. Besides which I CAN'T give you the code because I don't know what all of your forms and controls are called. Actually, the sample is not all that difficult. It just looks that way. Each button does a different thing. Try looking at "RequerySubSubForm". This gives you most of what you need. To requery the combo box on the subsubform it would be: Me.subControl1.Form!subsubcontrol1.Form!txtLineTyp e.Requery This is for a button on the main form. If you wanted it to requery on the AfterUpdate event of a control on the subform, it would be: Me.subsubcontrol1.Form!txtLineType.Requery The problem here is that referencing subforms is very dependant on the names used. Most important is the fact that you need to use the name of the CONTROL that displays the subform and not the subform name itself when referencing. If both of your combo boxes are on the SAME level, I have another sample "CascadingComboBoxes.mdb" which illustrates how to requery a combo in a subform. -- --Roger Carlson www.rogersaccesslibrary.com Reply to: Roger dot Carlson at Spectrum-Health dot Org "Joe" wrote in message ... Roger: Wow this is super... unfortunately, your forms/subforms is way too difficult for me to understand. I have spend now days on this problem and I'm still getting ahead w/ a solution for my particular scenario. I use combo boxes in the subforms and want to make sure I can refresh subordinate combo boxes after the parent combo has changed. Do you mind providing me any pointers how to do that? Please keep it simple though. Joe "Roger Carlson" wrote in message ... On my website (see sig below) is a small sample database called "SubformReference.mdb" which illustrates this and many other issues with referencing subforms. -- --Roger Carlson www.rogersaccesslibrary.com Reply to: Roger dot Carlson at Spectrum-Health dot Org "Joe" wrote in message ... Does anyone know how to requery multiple layers of subform. - First, I have a main form which has a subform_1. - Then, when action is taken on subform_1, I need to refresh a field on subform_2 (child of subform_1). - Lastly, when action is taken on subform_2, I need to refresh a field on subform_3 (child of subform_2). Thanks, Joe |
Thread Tools | |
Display Modes | |
|
|