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  

Calling a Function on a subform from the Main Form (Round II)



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 7th, 2008, 09:29 PM posted to microsoft.public.access.forms
Max Moor
external usenet poster
 
Posts: 148
Default Calling a Function on a subform from the Main Form (Round II)

Hi All,

I asked how to do this some time back, and got a response from Allen
Browne, explaining (in part):

If the subform is name Sub1, and the procedure is named Text0_AfterUpdate,
you can then call it like this:

Call Form_Sub1.Text0_AfterUpdate


I 've been doing this and everything works fine. Every so often, I
get a sick desire to understand what's happening under all the comfy layers
I usually stay above.

In this case, when I make a call like the one above, how would Access
know that I wanted the instance of Form_Sub1 that is a child on the main
form making the call? I think this has worked so far because I never have
more than one instance of any given form open at a time.

Allen also suggested that the function being called be moved into a
standard module, then passed a reference to the form I want to work done
by. I can see how that would fix things.

In search of a calling convention that would properly resolve to the
child form's function, I tried, "Call Forms!frmMain!
fsub_Child.Form.FuncCall", where fsub_Child is the subform's control name.
It didn't work, but I'm sure those of you in the know could have told me
that it wouldn't.

Is there a syntax that I could use to call the child form's function
specifically?

Regards,
Max
 




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 08:02 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.