Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using data outside of a rpt data source (Access XP/SQL Svr 2000 SP-3)

    I need to use data that cannot be included in a report's data source for some calculations on the report. Nothing I've tried has worked...

    Thanks,

    Keith

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

    Re: using data outside of a rpt data source (Access XP/SQL Svr 2000 SP-3)

    You can use the domain functions such as DLookup, DCount, DSum etc. if you want to refer to data that are in the database, but not in the record source of the report.

    General format: DFunction("field-or-expression", "table-or-query-name", "optional where-condition")

    Examples: to return the number of records in the customers table:

    =DCount("*", "tblCustomers")

    To return the sum of amounts in the Sales table for sale dates after January 1, 2003:

    =DSum("SalesAmount", "tblSales", "SaleDate > #1/1/2003#")

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using data outside of a rpt data source (Access XP/SQL Svr 2000 SP-3)

    Hans,

    Thank you thank you thank you. I have a library of books on Access and I can count the references to the domain functions on one hand. Once I knew what to look for, I was set. I've learned so much, but know so little...

    Keith

Posting Permissions

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