[AccessD] Update the value of a control on parent form from subform

Arthur Fuller artful at rogers.com
Fri Sep 9 17:23:10 CDT 2005


Shamil recently assisted me with the syntax to refer to a control on a
subform, and now I need to do the opposite from within a "With Me" block. I
tried "Parent" as in the following sample line, with a couple of variations,
but I got it wrong. 
With Me
    .Parent.MyControl = 12345
    .Parent.Form.MyControl = 12345
    .Parent.Form.MyControl.Value = 12345
End With

And another thing about these "With Me" blocks. It appears from my
experiments that you cannot nest them. I.e.
With Me
    .control1 = 124
    .control2 = "This is some text"
    With .mySubForm
        .control1 = True
        .control2 = "This is some more text"
    End With
End With

Whereas one can next Case blocks, While loops, If blocks, etc. Can anyone
think of a logical reason why With blocks do not conform to the general
rule?
TIA,
Arthur





More information about the AccessD mailing list