Results 1 to 4 of 4
  1. #1
    darwinli is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    2

    Need help with this query! probably simple

    hi all



    got a quick question, please see the images below

    Click image for larger version. 

Name:	1.JPG 
Views:	4 
Size:	80.4 KB 
ID:	8841Click image for larger version. 

Name:	2.JPG 
Views:	4 
Size:	56.0 KB 
ID:	8842
    basically i want a new table to show this

    ID/loc desc/AM counts/PM Counts/Sat Counts/Sum ( / seperates each column)


    as you can see, i go to calculate the totals for each ID but cannot seem to add additional columns with what I want, each ID and Count (AM/PM or SAt) is a new data entry so does it not like that combined into 1 row?

    Sorry I am new to access and tryin to learn this for my job

    thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try a crosstab query.

    OR

    Create fields in query with expressions like:

    CountAM: IIf(AM_PM_SAT="AM",[Count],0)
    CountPM: IIf(AM_PM_SAT="PM",[Count],0)
    CountSAT: IIf(AM_PM_SAT="SAT",[Count],0)

    Then apply the Sum aggregate function to each of these.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    darwinli is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    2
    you tried to execute a query as part of an aggregate function


    i get this when i try expression

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Expression works for me. Show your attempted sql statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Just simple query
    By BorisGomel in forum Queries
    Replies: 9
    Last Post: 06-20-2011, 09:31 AM
  2. Simple Query
    By tombsy in forum Access
    Replies: 2
    Last Post: 02-01-2011, 09:48 AM
  3. Simple query help
    By Subhunter in forum Queries
    Replies: 9
    Last Post: 11-19-2010, 03:32 PM
  4. need help with this simple query
    By dada in forum Programming
    Replies: 3
    Last Post: 08-20-2010, 07:08 AM
  5. Need Help with a very simple query
    By bikerguy06 in forum Queries
    Replies: 3
    Last Post: 06-08-2009, 08:43 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