Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Unanswered: Referencing a control on a subform

    Good Morning

    I have the following code which browses to a form from a button on the form reportcentre

    DoCmd.BrowseTo ObjectType:=acBrowseToForm, _
    ObjectName:="IncReport", _
    PathToSubformControl:="Main.NavigationSubform>Repo rtCenter.sfrReportPage", _
    WhereCondition:="*", _

    I require to change the visibility of some of the feilds on the form "increport"

    As I understand I am required to identfiy all levels for example


    I have tried several variations but cannot get it to work for example

    Forms!main!reportcenter.form.strReportPage!incRepo rt.form.test.visible = False

    Any suggestions would be appriciated

    Thank you

    For some reason on this posting there is a space on the increport this is not the case in the script
    Last edited by pjawynn; 11-20-13 at 05:24.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    dunno where you are gettignthe additional '.form' from
    shoudl do it.

    although if I was you I'd pull the value when required as opposed to pushing a value
    myvariable = forms!thereportcentreform!thecontrol
    acontrol.visible = myvariable
    anothercontrol.visible = myvariable

    Or pass the variable as part of the forms openargs property
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts