Referencing Subforms

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

    #1

    Referencing Subforms

    Hi everyone.

    I have designed a form 'frmPeople' with a subform 'fsubPeopleList '

    This form works fine on it's own but when used as a subform on a main menu
    it doesn't work.

    The code in question is as below and the line causing the problem has the *
    to the right of the text.

    Can anyone see what I'm doing wrong please.

    Thanks in Advance,

    John
    >>>>>>>>>>>>>>> >>>>>
    Option Compare Database
    Option Explicit

    Private Sub Form_Current()

    Dim theRecord As String
    If Me.CurrentRecor d <Me.Parent.Curr entRecord Then
    theRecord = Me.CurrentRecor d
    DoCmd.GoToRecor d acDataForm, Parent.Name, acGoTo, theRecord *
    Me.Parent.strSe arch.SetFocus
    End If

    End Sub


  • John Ortt

    #2
    Re: Referencing Subforms

    Found my own reply thankfully:

    "Access won't let you have a subform within a subform if the data has to be
    displayed in a continuous form."

    taken from:
    http://msdn.microsoft.com/library/de...tml/sa03c1.asp
    >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>
    "John Ortt" <johnortt@noema ilsuppliedasdon twantspam.comwr ote in message
    news:4540b98b$1 _1@glkas0286.gr eenlnk.net...
    Hi everyone.
    >
    I have designed a form 'frmPeople' with a subform 'fsubPeopleList '
    >
    This form works fine on it's own but when used as a subform on a main menu
    it doesn't work.
    >
    The code in question is as below and the line causing the problem has the
    * to the right of the text.
    >
    Can anyone see what I'm doing wrong please.
    >
    Thanks in Advance,
    >
    John
    >
    >>>>>>>>>>>>>>> >>>>>>
    >
    Option Compare Database
    Option Explicit
    >
    Private Sub Form_Current()
    >
    Dim theRecord As String
    If Me.CurrentRecor d <Me.Parent.Curr entRecord Then
    theRecord = Me.CurrentRecor d
    DoCmd.GoToRecor d acDataForm, Parent.Name, acGoTo, theRecord *
    Me.Parent.strSe arch.SetFocus
    End If
    >
    End Sub
    >

    Comment

    • John Ortt

      #3
      Re: Referencing Subforms

      No I haven't,

      The previous posting refers to using continuous forms at the top level which
      I am not doing.

      Oh well, any ideas?


      "John Ortt" <johnortt@noema ilsuppliedasdon twantspam.comwr ote in message
      news:4540be01$1 _1@glkas0286.gr eenlnk.net...
      Found my own reply thankfully:
      >
      "Access won't let you have a subform within a subform if the data has to
      be displayed in a continuous form."
      >
      taken from:
      http://msdn.microsoft.com/library/de...tml/sa03c1.asp
      >
      >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>
      >
      "John Ortt" <johnortt@noema ilsuppliedasdon twantspam.comwr ote in message
      news:4540b98b$1 _1@glkas0286.gr eenlnk.net...
      >Hi everyone.
      >>
      >I have designed a form 'frmPeople' with a subform 'fsubPeopleList '
      >>
      >This form works fine on it's own but when used as a subform on a main
      >menu it doesn't work.
      >>
      >The code in question is as below and the line causing the problem has the
      >* to the right of the text.
      >>
      >Can anyone see what I'm doing wrong please.
      >>
      >Thanks in Advance,
      >>
      >John
      >>
      >>>>>>>>>>>>>>> >>>>>>>
      >>
      >Option Compare Database
      >Option Explicit
      >>
      >Private Sub Form_Current()
      >>
      >Dim theRecord As String
      >If Me.CurrentRecor d <Me.Parent.Curr entRecord Then
      >theRecord = Me.CurrentRecor d
      >DoCmd.GoToReco rd acDataForm, Parent.Name, acGoTo, theRecord *
      >Me.Parent.strS earch.SetFocus
      >End If
      >>
      >End Sub
      >>
      >
      >

      Comment

      Working...