Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Manchester, NH

    Unanswered: Calculating Totals of multiple fields in 1 query

    I am trying to write a query that will give me the totals of a few different fields based on a name and date on an open

    startup form has "SUPERVISOR" and "DATE" drop down boxes. based on the selected supervisor and date it would count the number of field one, field 2, field 3 etc for every person who is assigned to the selected supervisor.

    example of what I want it to do:
    select count(stops), count (starts), count(jumps)
    from [daily reports]
    where [daily reports].supervisor=forms!startup!supervisor and (datepart("m", [date]= forms!startup!date)

    Any help would be much appreciated.

    Thank you.


  2. #2
    Join Date
    Nov 2002
    San Francisco
    i guess the problem is in (datepart("m", [date]= forms!startup!date)

    if nothing else, use bracket on different place... (datepart("m", [date])= forms!startup!date

    also are you sure that forms!startup!date returns a number and not whole date? If it returns a date, you should apply DATEPART also there.... DATEPART("m", forms!startup!date)


Posting Permissions

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