Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Unanswered: linking a textbox to a query count

    I have a form that has a query subform on it. i filter the query based on a combo box result. I have a textbox that i want to show how many records are in the filtered query.

    If there is 35 records in the query then i want to have the text box show
    Records on file: 35

    I know you can put a count row on the query but i want to show the number of files somewhere else on the form.

  2. #2
    Join Date
    Oct 2009
    make a second query that is an aggregate query that simply returns the record count; one record, one field

    plug that into your form as another subform.

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    Anywhere on the subform, you can have a text box that shows how many records are returned in the subform (again using =count() in an unbound field.) If the records are in a listbox on the subform, in a unbound text box you can use: =Forms!MyFormName!MySubformName!MyListboxName.list count -1. (which you could then have this text box on your main form as well.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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