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  

executing a subform's subroutine from the main form



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2006, 05:01 PM posted to microsoft.public.access.forms
David Gartrell
external usenet poster
 
Posts: 14
Default executing a subform's subroutine from the main form

Hi Everyone,

Wonder if someone could help. Basically I have a main form called
'Order_header' and within it a subform called 'order_header_subform'.
Attached to the subform I have a subroutine I've written called 'Totals'.

What i'd like to be able to do is to call the subform's 'totals' subroutine
from the main form but am unsure of the correct syntax. I have tried:
[Forms]![order header]![order_header_subform].totals

But without success. If anyone could point me in the right direction with
this then i'd be very grateful.

Many thanks

David.


  #2  
Old November 14th, 2006, 05:07 PM posted to microsoft.public.access.forms
kingston via AccessMonster.com
external usenet poster
 
Posts: 620
Default executing a subform's subroutine from the main form

Make sure the subform procedure is Public. Then in the main form, use:

Me.order_header_subform.Form.Totals

David Gartrell wrote:
Hi Everyone,

Wonder if someone could help. Basically I have a main form called
'Order_header' and within it a subform called 'order_header_subform'.
Attached to the subform I have a subroutine I've written called 'Totals'.

What i'd like to be able to do is to call the subform's 'totals' subroutine
from the main form but am unsure of the correct syntax. I have tried:
[Forms]![order header]![order_header_subform].totals

But without success. If anyone could point me in the right direction with
this then i'd be very grateful.

Many thanks

David.


--
Message posted via http://www.accessmonster.com

  #3  
Old November 16th, 2006, 09:10 AM posted to microsoft.public.access.forms
David Gartrell
external usenet poster
 
Posts: 14
Default executing a subform's subroutine from the main form

Thanks very much for your help.

It worked perfectly!

"kingston via AccessMonster.com" u27511@uwe wrote in message
news:694899b6ba778@uwe...
Make sure the subform procedure is Public. Then in the main form, use:

Me.order_header_subform.Form.Totals

David Gartrell wrote:
Hi Everyone,

Wonder if someone could help. Basically I have a main form called
'Order_header' and within it a subform called 'order_header_subform'.
Attached to the subform I have a subroutine I've written called 'Totals'.

What i'd like to be able to do is to call the subform's 'totals'
subroutine
from the main form but am unsure of the correct syntax. I have tried:
[Forms]![order header]![order_header_subform].totals

But without success. If anyone could point me in the right direction with
this then i'd be very grateful.

Many thanks

David.


--
Message posted via http://www.accessmonster.com



 




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 12:01 AM.


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