Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to display total clients from another form (2003)

    Hi

    I have a form called FrmDashpanel, from which I have all my command buttons to other parts of the database, it also displays a summary of information like total clients etc. (Or atleast its meant to)

    How do I reference a text box to display data from another closed form/table
    And will the Count() work example. Count([Forms!FrmIncompletes.CRN])
    And how do I reference to data within a subform.

    Many thanks
    Regards
    Gerbil (AKA Kevin)

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

    Re: How to display total clients from another form (2003)

    You can't refer to controls on a closed form. Instead, you can use functions such as DLookup, DCount and DSum to display values or aggregates from a table or query. For example, a text box with control source
    <code>
    =DCount("*", "tblSomething")
    </code>
    will display the number of records in tblSomething, and a text box with control source
    <code>
    =DSum("Amount", "tblSomething")
    </code>
    will display the sum of the field Amount over all records in tblSomething. And a text box with control source
    <code>
    =DLookup("Profit", "tblSomething", "CompanyID = 37")
    </code>
    will display the value of the Profit field in tblSomething for the record for which CompanyID is equal to 37.

Posting Permissions

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