Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    count function (2000)

    Hello I have a control on the parent form that I wish to return a count on how many records there are on the subform. I have tried this =Count([Forms]![frmMain]![frmNotes Subform].[Form]![notesID])...which I believed to be right, but it isn't. For reference my count control is on frmMain where the number of notesId instances are counted where notesID sits on subform 'frmNotes subform'.

    Many thanks Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: count function (2000)

    Put a text box on the subform, for example in the subform header or footer. It may be hidden (Visible = No).
    Name it txtCount, and set its Control Source to <code>=Count(*)</code>
    Put a text box on the main form, and set its Control Source to <code>=[frmNotes Subform]![txtCount]</code>
    Note: you must use the name of the subform as a control on the main form; this is not necessarily the same as the name of the subform in the database window.

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: count function (2000)

    thanks Hans

Posting Permissions

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