Results 1 to 3 of 3
  1. #1
    kestefon is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    108

    Count Records in Two Queries?

    I have two queries, let's called them Query1 and Query2. I'd like to create a third query that looks like this:


    Code:
    File          RecordCount    Date
    Query1.txt      ###      (Current Date)
    Query2.txt      ###      (Current Date)
    I know I can use concatenation and a date function for the first and third fields, so my main question is the proper syntax in order to get this layout.

    Thanks!

  2. #2
    kestefon is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    108
    Any ideas? It seems like it should be simple, but I can't get the SQL to work.

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Try the DCount function.

    Dcount("*","table or query name","criteria, if any")

    The criteria part can be left out if you just need a count of all the records.

    But how are you going to get the table / query names? They have to come from somewhere; you cannot hard-code them in the query. You could do it quite easily by putting the table or query names in another, separate small table.


    HTH

    John

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Count of Tables, Queries etc.
    By lenlab in forum Access
    Replies: 4
    Last Post: 08-17-2013, 09:36 AM
  2. Replies: 1
    Last Post: 05-20-2013, 02:14 PM
  3. Replies: 1
    Last Post: 01-24-2013, 05:50 PM
  4. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  5. Count date entries from seperate tables/queries
    By krutoigoga in forum Queries
    Replies: 3
    Last Post: 06-30-2011, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums