executing a subform's subroutine from the main form

D

David Gartrell

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.
 
K

kingston via AccessMonster.com

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

Me.order_header_subform.Form.Totals

David said:
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.
 
D

David Gartrell

Thanks very much for your help.

It worked perfectly!

kingston via AccessMonster.com said:
Make sure the subform procedure is Public. Then in the main form, use:

Me.order_header_subform.Form.Totals

David said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top