Results 1 to 6 of 6
  1. #1
    sam.eade is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    29

    Count Field in a different query

    Hi all,



    Just to give you a bit of background, I'm trying to export three queries (a header, body and a footer) into three separate text files.

    The Header contains generic information with a daily reference, the Body contains details of all items placed and the Footer shows how many items have been placed that day.


    The footer query needs to have a field that counts the amount of records that are in the body query (on a daily basis). i.e. the footer would read "There have been " & [RecordCount].[Export.Body] & " items placed today"


    I just can't figure it out from the Query Design. Does any one have any advice or need more information in order to understand the question?

    Many Thanks

    Sam

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Using the filesystemobject library and enumerating lines of text is probably the solution.
    https://www.accessforums.net/import-...tml#post225478

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Try

    DCount("*", "QueryName")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    sam.eade is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    29
    Quote Originally Posted by pbaldy View Post
    Try

    DCount("*", "QueryName")
    Thankyou pbaldy

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I totally missed the point on that one...

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

Similar Threads

  1. Replies: 7
    Last Post: 04-28-2014, 07:09 AM
  2. Replies: 3
    Last Post: 11-23-2013, 05:05 PM
  3. Replies: 4
    Last Post: 07-28-2013, 12:40 AM
  4. Replies: 4
    Last Post: 01-24-2013, 10:10 AM
  5. Query to group and count field entries
    By newtoAccess in forum Queries
    Replies: 4
    Last Post: 11-29-2010, 09:19 AM

Tags for this Thread

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