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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 | |
|
|