Subform update

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,

I am facing with the following problem.
I have 1 form and two subforms, both placed on main form.
I want to be able to show update in 1 field of Sub 2 once
I have updated Sub1 (datasheet type).
I Have also seen the following suggestion, but it does not
work:

me.MySub2.requery

"where 'MySub2' is the name of the subform control. In
design view click once on the subform, then check the
*name* property under the *Other* tab. What you find there
goes in place of "MySub2".

I Can't get it to work, I cannot see *name* property, only
*caption*.
Thank you for your help.
 
Hi Chris,

Sounds like you have the form selected instead of the subform. Try this,
first click somewhere on the main form then click once on the border of the
subform. The grab handles should be around the border of the subform
control. Now look under the Other Tab of the property sheet.
 
Hi Sandra,

Thank you for your help, I know what you mean now!
I have found the *name* property and used it in the
formula.
However, it still does not update sub2, I need the right
formula and where to put it, ie Main form, sub1 or sub2?

I open a main form that contains 2 subforms, I then update
the Sub1, which ideally when finished with it would update
Sub2.

What I am looking for now is the full expression and the
location of it meaning in which form, I have tried lods
and nothing happens....

Thanks for your help,
Chris.
-----Original Message-----
Hi Chris,

Sounds like you have the form selected instead of the subform. Try this,
first click somewhere on the main form then click once on the border of the
subform. The grab handles should be around the border of the subform
control. Now look under the Other Tab of the property sheet.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Hi,

I am facing with the following problem.
I have 1 form and two subforms, both placed on main form.
I want to be able to show update in 1 field of Sub 2 once
I have updated Sub1 (datasheet type).
I Have also seen the following suggestion, but it does not
work:

me.MySub2.requery

"where 'MySub2' is the name of the subform control. In
design view click once on the subform, then check the
*name* property under the *Other* tab. What you find there
goes in place of "MySub2".

I Can't get it to work, I cannot see *name* property, only
*caption*.
Thank you for your help.


.
 
In the AfterUpdate event of the form for sub1 you would requery sub2. Since
sub2 is a subform on the main form you have to reference it via the main
form. The easiest way to do this is using the Parent keyword:

me.parent.sub2.requery


--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Hi Sandra,

Thank you for your help, I know what you mean now!
I have found the *name* property and used it in the
formula.
However, it still does not update sub2, I need the right
formula and where to put it, ie Main form, sub1 or sub2?

I open a main form that contains 2 subforms, I then update
the Sub1, which ideally when finished with it would update
Sub2.

What I am looking for now is the full expression and the
location of it meaning in which form, I have tried lods
and nothing happens....

Thanks for your help,
Chris.
-----Original Message-----
Hi Chris,

Sounds like you have the form selected instead of the subform. Try
this, first click somewhere on the main form then click once on the
border of the subform. The grab handles should be around the border
of the subform control. Now look under the Other Tab of the property
sheet.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Hi,

I am facing with the following problem.
I have 1 form and two subforms, both placed on main form.
I want to be able to show update in 1 field of Sub 2 once
I have updated Sub1 (datasheet type).
I Have also seen the following suggestion, but it does not
work:

me.MySub2.requery

"where 'MySub2' is the name of the subform control. In
design view click once on the subform, then check the
*name* property under the *Other* tab. What you find there
goes in place of "MySub2".

I Can't get it to work, I cannot see *name* property, only
*caption*.
Thank you for your help.


.
 
Hi Sandra,

Thanks a million, it worked!
Christine.
-----Original Message-----
In the AfterUpdate event of the form for sub1 you would requery sub2. Since
sub2 is a subform on the main form you have to reference it via the main
form. The easiest way to do this is using the Parent keyword:

me.parent.sub2.requery


--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Hi Sandra,

Thank you for your help, I know what you mean now!
I have found the *name* property and used it in the
formula.
However, it still does not update sub2, I need the right
formula and where to put it, ie Main form, sub1 or sub2?

I open a main form that contains 2 subforms, I then update
the Sub1, which ideally when finished with it would update
Sub2.

What I am looking for now is the full expression and the
location of it meaning in which form, I have tried lods
and nothing happens....

Thanks for your help,
Chris.
-----Original Message-----
Hi Chris,

Sounds like you have the form selected instead of the subform. Try
this, first click somewhere on the main form then click once on the
border of the subform. The grab handles should be around the border
of the subform control. Now look under the Other Tab of the property
sheet.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Chris wrote:
Hi,

I am facing with the following problem.
I have 1 form and two subforms, both placed on main form.
I want to be able to show update in 1 field of Sub 2 once
I have updated Sub1 (datasheet type).
I Have also seen the following suggestion, but it does not
work:

me.MySub2.requery

"where 'MySub2' is the name of the subform control. In
design view click once on the subform, then check the
*name* property under the *Other* tab. What you find there
goes in place of "MySub2".

I Can't get it to work, I cannot see *name* property, only
*caption*.
Thank you for your help.


.


.
 
Back
Top