Subform no-brainer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith Wilby

    #1

    Subform no-brainer

    I'm having another one of *those* days today. I have a form which can have
    many data sources which are chosen from an option group. This all works
    fine except that the subform doesn't refresh even though I'm calling the
    main form's open event from the option group's update event. Any clues?

    Thanks.
    Keith.


  • Arno R

    #2
    Re: Subform no-brainer

    Hi Keith,
    Are you trying to (re)set the sourceobject for the sub ??

    Something like
    Me!SubForm.Sour ceObject = "YourSourceObje ct" should work

    Arno R

    "Keith Wilby" <here@there.com > schreef in bericht news:43f45372$1 _1@glkas0286.gr eenlnk.net...[color=blue]
    > I'm having another one of *those* days today. I have a form which can have
    > many data sources which are chosen from an option group. This all works
    > fine except that the subform doesn't refresh even though I'm calling the
    > main form's open event from the option group's update event. Any clues?
    >
    > Thanks.
    > Keith.
    >
    >[/color]

    Comment

    • Keith Wilby

      #3
      Re: Subform no-brainer

      "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
      news:43f468ca$0 $2031$ba620dc5@ text.nova.plane t.nl...
      Hi Keith,
      Are you trying to (re)set the sourceobject for the sub ??

      Something like
      Me!SubForm.Sour ceObject = "YourSourceObje ct" should work

      Arno R

      Hi Arno, thanks for the response. In my subform's open event I have VBA SQL
      code which defines its record source. It's this that isn't refreshing when
      the main form's open even fires. I'm using global variables as containers
      for project names, the contents of which change depending on which option is
      selected from the option group on the main form. The contents of the GVs
      are then used in the SQL code.

      It's a bit difficult for me to explain but I hope you get the gist.

      Regards,
      Keith.


      Comment

      • Arno R

        #4
        Re: Subform no-brainer

        "Keith Wilby" <here@there.com > schreef in bericht news:43f47437$1 _1@glkas0286.gr eenlnk.net...[color=blue]
        > "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
        > news:43f468ca$0 $2031$ba620dc5@ text.nova.plane t.nl...
        > Hi Keith,
        > Are you trying to (re)set the sourceobject for the sub ??
        >
        > Something like
        > Me!SubForm.Sour ceObject = "YourSourceObje ct" should work
        >
        > Arno R
        >
        > Hi Arno, thanks for the response. In my subform's open event I have VBA SQL
        > code which defines its record source. It's this that isn't refreshing when
        > the main form's open even fires. I'm using global variables as containers
        > for project names, the contents of which change depending on which option is
        > selected from the option group on the main form. The contents of the GVs
        > are then used in the SQL code.
        >
        > It's a bit difficult for me to explain but I hope you get the gist.
        >
        > Regards,
        > Keith. [/color]


        I guess your sub's open event will *not* fire when you call the mainform's open event.
        I guess you need to call the sub's open event explicitly in this case.
        (Or just close and reopen the main form?)

        HTH
        Arno R

        Comment

        • Keith Wilby

          #5
          Re: Subform no-brainer

          "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
          news:43f481a1$1 $2022$ba620dc5@ text.nova.plane t.nl...
          "Keith Wilby" <here@there.com > schreef in bericht
          news:43f47437$1 _1@glkas0286.gr eenlnk.net...[color=blue]
          > "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
          > news:43f468ca$0 $2031$ba620dc5@ text.nova.plane t.nl...
          > Hi Keith,
          > Are you trying to (re)set the sourceobject for the sub ??
          >
          > Something like
          > Me!SubForm.Sour ceObject = "YourSourceObje ct" should work
          >
          > Arno R
          >
          > Hi Arno, thanks for the response. In my subform's open event I have VBA
          > SQL
          > code which defines its record source. It's this that isn't refreshing
          > when
          > the main form's open even fires. I'm using global variables as containers
          > for project names, the contents of which change depending on which option
          > is
          > selected from the option group on the main form. The contents of the GVs
          > are then used in the SQL code.
          >
          > It's a bit difficult for me to explain but I hope you get the gist.
          >
          > Regards,
          > Keith.[/color]

          [color=blue]
          > I guess your sub's open event will *not* fire when you call the mainform's
          > open event.
          > I guess you need to call the sub's open event explicitly in this case.
          > (Or just close and reopen the main form?)[/color]
          [color=blue]
          > HTH
          > Arno R[/color]

          Thanks Arno, I had been trying to fire the sub's open event from the main
          form but can't get the syntax right. Thanks for your patience, I feel like
          a total clueless newbie on this.

          Keith.


          Comment

          • Arno R

            #6
            Re: Subform no-brainer


            "Keith Wilby" <here@there.com > schreef in bericht news:43f482a3$1 _1@glkas0286.gr eenlnk.net...[color=blue]
            > "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
            > news:43f481a1$1 $2022$ba620dc5@ text.nova.plane t.nl...
            > "Keith Wilby" <here@there.com > schreef in bericht
            > news:43f47437$1 _1@glkas0286.gr eenlnk.net...[color=green]
            >> "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
            >> news:43f468ca$0 $2031$ba620dc5@ text.nova.plane t.nl...
            >> Hi Keith,
            >> Are you trying to (re)set the sourceobject for the sub ??
            >>
            >> Something like
            >> Me!SubForm.Sour ceObject = "YourSourceObje ct" should work
            >>
            >> Arno R
            >>
            >> Hi Arno, thanks for the response. In my subform's open event I have VBA
            >> SQL
            >> code which defines its record source. It's this that isn't refreshing
            >> when
            >> the main form's open even fires. I'm using global variables as containers
            >> for project names, the contents of which change depending on which option
            >> is
            >> selected from the option group on the main form. The contents of the GVs
            >> are then used in the SQL code.
            >>
            >> It's a bit difficult for me to explain but I hope you get the gist.
            >>
            >> Regards,
            >> Keith.[/color]
            >
            > [color=green]
            >> I guess your sub's open event will *not* fire when you call the mainform's
            >> open event.
            >> I guess you need to call the sub's open event explicitly in this case.
            >> (Or just close and reopen the main form?)[/color]
            > [color=green]
            >> HTH
            >> Arno R[/color]
            >
            > Thanks Arno, I had been trying to fire the sub's open event from the main
            > form but can't get the syntax right. Thanks for your patience, I feel like
            > a total clueless newbie on this.[/color]

            You are welcome Keith,
            Try: Call Form_NameOfSubF orm.Form_Open (False)

            Arno R

            Comment

            • Keith Wilby

              #7
              Re: Subform no-brainer

              "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
              news:43f487c3$0 $2025$ba620dc5@ text.nova.plane t.nl...

              "Keith Wilby" <here@there.com > schreef in bericht
              news:43f482a3$1 _1@glkas0286.gr eenlnk.net...[color=blue]
              > "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
              > news:43f481a1$1 $2022$ba620dc5@ text.nova.plane t.nl...
              > "Keith Wilby" <here@there.com > schreef in bericht
              > news:43f47437$1 _1@glkas0286.gr eenlnk.net...[color=green]
              >> "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
              >> news:43f468ca$0 $2031$ba620dc5@ text.nova.plane t.nl...
              >> Hi Keith,
              >> Are you trying to (re)set the sourceobject for the sub ??
              >>
              >> Something like
              >> Me!SubForm.Sour ceObject = "YourSourceObje ct" should work
              >>
              >> Arno R
              >>
              >> Hi Arno, thanks for the response. In my subform's open event I have VBA
              >> SQL
              >> code which defines its record source. It's this that isn't refreshing
              >> when
              >> the main form's open even fires. I'm using global variables as
              >> containers
              >> for project names, the contents of which change depending on which option
              >> is
              >> selected from the option group on the main form. The contents of the GVs
              >> are then used in the SQL code.
              >>
              >> It's a bit difficult for me to explain but I hope you get the gist.
              >>
              >> Regards,
              >> Keith.[/color]
              >
              >[color=green]
              >> I guess your sub's open event will *not* fire when you call the
              >> mainform's
              >> open event.
              >> I guess you need to call the sub's open event explicitly in this case.
              >> (Or just close and reopen the main form?)[/color]
              >[color=green]
              >> HTH
              >> Arno R[/color]
              >
              > Thanks Arno, I had been trying to fire the sub's open event from the main
              > form but can't get the syntax right. Thanks for your patience, I feel
              > like
              > a total clueless newbie on this.[/color]

              You are welcome Keith,
              Try: Call Form_NameOfSubF orm.Form_Open (False)

              Arno R

              Tried that Arno but it won't compile. This is a "nice to have" that I've
              spent way too much time on so I'm going to leave it now. Thanks anyway.

              Regards,
              Keith.


              Comment

              • Keith Wilby

                #8
                Re: Subform no-brainer

                "Arno R" <arraNOcomSPAM@ tiscali.nl> wrote in message
                news:43f481a1$1 $2022$ba620dc5@ text.nova.plane t.nl...
                [color=blue]
                > (Or just close and reopen the main form?)[/color]

                Hi Arno, I got it to work using this method in the end, thanks for the tip.

                Regards,
                Keith.


                Comment

                Working...