Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    General Reporting Inquiry (97 SR2)

    I have several different queries in my database. How would I go about pulling data from all of these queries?

    For example, I have a query that tells me all of the complete entries, "Complete" being an entry under [Status]. In my 'Complete' report, I can do '=Count([status])' and that will give me the total number of complete entries in my database, the problem is, if I =Count([Status]) anywhere else, it returns everything where status isn't null...

    How can I add conditions to my =Count function?

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: General Reporting Inquiry (97 SR2)

    Create a text box on your report with control source =DCount("*","tblName","[Status]='Complete'")

  3. #3
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: General Reporting Inquiry (97 SR2)

    DrkRealm,
    I don't know if this is good programming practice, or if it saves time as opposed to the dcount (which would work swell), but -- often I do the following: Say you have three status. I'll create a query off of the original data with two fields -- one, status "grouped" for status = "Complete", the 2nd field I might call "StatCompleteCount", and I'll "count" that. So, you have one aggregate query for one status. I'll do the same for each status -- ending up w/ 3 queries of two fields each, limited by different statuses. I'll then create my report query, and include the three aggregate queries _but_ do not join. I'll drag in the three count fields. This will cause the same data to replicate in each row, but it will not duplicate the row even though a cross-join, because each query returns a single row only. Will this work? -- Pat
    > I have several different queries in my database. How would I go about pulling data from all of these queries? ..... the complete entries, "Complete" being an entry under [Status]. In my 'Complete' report, I can do '=Count([status]) ..... How can I add conditions to my =Count function?

Posting Permissions

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