Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Referring to subform on a Parent form. (Access97)


Message #1 by John Fejsa <John.Fejsa@h...> on Thu, 27 Sep 2001 15:50:48 +1000
What em I doing wrong here?



I have a form containing number of sub forms. When I update a field in one 

subform I need another subform to requery in other to show various updated 

totals.



In AfterUpdate even on the first subform I tried various options including:





Tried First

--------------

Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer to parent form



Then I tried

---------------

Forms!frmGrants!frmFundsTotalssubform.Requery 'Refer to full name



I even tried :

Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer to parent form

Me.Parent!frmGrants!frmFundsTotalssubform.Refresh 'Refresh the subform



When I tried executing the Me!frmFundsTotalssubform.Requery statement from 

a command button on the parent form it works, however, the Me.Parent!frmGra

nts!frmFundsTotalssubform.Requery statementit just does not want to work 

from the subform.



To make it work I had to enter the following statements:

---------------------------------------------------------------------------

--

Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer to parent form

Me.Parent!frmGrants!frmFundsTotalssubform.Repaint 'Repaint the subform



However, the Repaint statement takes a long time to execute and I really 

don't want to use it unless necessary. I am sure there is a better method 

out there, if got the answer I'll love to hear from you.



Thanks



John





Message #2 by "John Ruff" <papparuff@c...> on Thu, 27 Sep 2001 07:25:50 -0700
Try,

Forms!frmGrants!frmFundsTotalssubform.Form.Requery 



John Ruff - The Eternal Optimist :-) 







-----Original Message-----

From: John Fejsa [mailto:John.Fejsa@h...]

Sent: Wednesday, September 26, 2001 10:51 PM

To: Access

Subject: [access] Referring to subform on a Parent form. (Access97)





What em I doing wrong here?



I have a form containing number of sub forms. When I update a field in

one subform I need another subform to requery in other to show various

updated totals.



In AfterUpdate even on the first subform I tried various options

including:



Tried First

-------------- Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer

to parent form



Then I tried

---------------

Forms!frmGrants!frmFundsTotalssubform.Requery 'Refer to full name



I even tried : Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer

to parent form Me.Parent!frmGrants!frmFundsTotalssubform.Refresh

'Refresh the subform



When I tried executing the Me!frmFundsTotalssubform.Requery statement

from a command button on the parent form it works, however, the

Me.Parent!frmGrants!frmFundsTotalssubform.Requery statementit just does

not want to work from the subform.



To make it work I had to enter the following statements:

------------------------------------------------------------------------

-----

Me.Parent!frmGrants!frmFundsTotalssubform.Requery 'Refer to parent form

Me.Parent!frmGrants!frmFundsTotalssubform.Repaint 'Repaint the subform



However, the Repaint statement takes a long time to execute and I really

don't want to use it unless necessary. I am sure there is a better

method out there, if got the answer I'll love to hear from you.



Thanks



John

  Return to Index