A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Requery



 
 
Thread Tools Display Modes
  #1  
Old June 9th, 2004, 01:55 PM
Joe
external usenet poster
 
Posts: n/a
Default 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  
Old June 9th, 2004, 02:35 PM
Roger Carlson
external usenet poster
 
Posts: n/a
Default 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  
Old June 9th, 2004, 02:59 PM
Joe
external usenet poster
 
Posts: n/a
Default 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  
Old June 9th, 2004, 03:35 PM
Roger Carlson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.