[AccessD] help - syntax for subform

Kath Pelletti kp at sdsonline.net
Mon Feb 18 17:25:45 CST 2008


Can anyone help with syntax needed here.....

I have been working on a routine called SecureForm() which locks/disable controls for any form which is passed to it.

The routine is called on each form's 'On Load' event and works fine for main forms by passing the 'me.name' string.

I now need to add code to the OnLoad of the subforms as well .....so I need to pass it the FULL name of the subform (including the full reference to the parent name), not just the name of the subform itself.

I have been mucking around with the parent property with no luck so in the code below I am trying to get around the error by actually typing in the name of the subform but even that is giving me the same error.


------------------------------
Code is:

    'Call SecureForm function which locks controls, depending on which user group is logged in.
    'strformname = Me.Name            'this works for main forms but not subforms
    strformname = "Forms!FrmPersonDetails!FrmSubformPeopleatWorkplace"
    
    Call SecureForm(strformname)
----------------------------------------

Kath

______________________________________
Kath Pelletti
Software Design and Solutions Pty Ltd
Ph: 9505-6714
Fax: 9505-6430
kp at sdsonline.net


More information about the AccessD mailing list