skip patterns thru a module....current forms problem

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

    skip patterns thru a module....current forms problem

    OK we have it so we can use tables to define skip patterns on our forms.
    BUT we can only do one form.
    Public Function skipPattern(cur rentFrm As Form, Optional currentCtl As Control =
    Null) As Integer

    the current form.

    ouch.

    this works fine as long as the controls are all on one form.
    BUT when they cross to another form we are toast.

    how can we pass me for a form that does not have the focus?

    I can not see a way to do this. Has anyone done anything like it?

    thanks big time for tips, ideas or even a link to some page that shows how or if
    this can be done


    thanks again for any help

    Jerry

  • rkc

    #2
    Re: skip patterns thru a module....curre nt forms problem

    sparks wrote:[color=blue]
    > OK we have it so we can use tables to define skip patterns on our forms.
    > BUT we can only do one form.
    > Public Function skipPattern(cur rentFrm As Form, Optional currentCtl As Control =
    > Null) As Integer
    >
    > the current form.
    >
    > ouch.
    >
    > this works fine as long as the controls are all on one form.
    > BUT when they cross to another form we are toast.
    >
    > how can we pass me for a form that does not have the focus?
    >
    > I can not see a way to do this. Has anyone done anything like it?[/color]

    Any form that is open is part of the Forms collection so you can
    pass it to your function as Forms("FormName ").

    Comment

    • Larry  Linson

      #3
      Re: skip patterns thru a module....curre nt forms problem

      "rkc" wrote
      [color=blue]
      > Any form that is open is part of the
      > Forms collection so you can
      > pass it to your function as
      > Forms("FormName ").[/color]

      Spl. Note: a Form displayed in a Subform Control is not "Open" and thus not
      in the Forms collection. It can be addressed as the Form property of the
      Subform Control in which it is displayed.

      And, if the form you want is not open, you can open it with

      DoCmd.OpenForm formname,.....


      Larry Linson
      Microsoft Access MVP


      Comment

      • sparks

        #4
        Re: skip patterns thru a module....curre nt forms problem

        On Tue, 28 Jun 2005 03:37:58 GMT, "Larry Linson" <bouncer@localh ost.not> wrote:
        [color=blue]
        >"rkc" wrote
        >[color=green]
        > > Any form that is open is part of the
        > > Forms collection so you can
        > > pass it to your function as
        > > Forms("FormName ").[/color]
        >
        >Spl. Note: a Form displayed in a Subform Control is not "Open" and thus not
        >in the Forms collection. It can be addressed as the Form property of the
        >Subform Control in which it is displayed.
        >
        >And, if the form you want is not open, you can open it with
        >
        > DoCmd.OpenForm formname,.....
        >
        >
        > Larry Linson
        > Microsoft Access MVP
        >[/color]
        this sounds like what we are seeing...subfor ms are not open.

        so I just need to keep track of controls on the form and when done, open the
        next form on the list and go from there..

        thanks will try it..


        Jerry

        Comment

        • David W. Fenton

          #5
          Re: skip patterns thru a module....curre nt forms problem

          sparks <sparks@anywher e.com> wrote in
          news:h5g2c1hk4a ke2i1lj8ke2qur6 5f5f0s27c@4ax.c om:
          [color=blue]
          > On Tue, 28 Jun 2005 03:37:58 GMT, "Larry Linson"
          > <bouncer@localh ost.not> wrote:
          >[color=green]
          >>"rkc" wrote
          >>[color=darkred]
          >> > Any form that is open is part of the
          >> > Forms collection so you can
          >> > pass it to your function as
          >> > Forms("FormName ").[/color]
          >>
          >>Spl. Note: a Form displayed in a Subform Control is not "Open" and
          >>thus not in the Forms collection. It can be addressed as the Form
          >>property of the Subform Control in which it is displayed.
          >>
          >>And, if the form you want is not open, you can open it with
          >>
          >> DoCmd.OpenForm formname,.....[/color]
          >
          > this sounds like what we are seeing...subfor ms are not open.[/color]

          Subforms *are* open -- they are just open as sub-objects of other
          forms, not as part of the forms collection itself.
          [color=blue]
          > so I just need to keep track of controls on the form and when
          > done, open the next form on the list and go from there..[/color]

          You can pass a form reference to your code that refers to a subform.
          The form reference for a subform is going to look something like
          this, though:

          Forms!ParentFor m!SubformContro lName.Form

          That kind of reference can be passed to your function.

          --
          David W. Fenton http://www.bway.net/~dfenton
          dfenton at bway dot net http://www.bway.net/~dfassoc

          Comment

          Working...