if statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a report that will show the sum of Semester one if the
student started on a specified date and the sum of students that reach their
mid point on the same date as the specified start date. I am new to this and
will be happy to supply any additional information needed. Can somebody help
me to do this? Any help at all will be appreciated.

Thank you,

Tracy
 
Does this do it for you?
SELECT Tracy.NAME, Sum(Tracy.[SEMESTER ONE]) AS [SumOfSEMESTER ONE],
Sum(Tracy.[SEMESTER TWO]) AS [SumOfSEMESTER TWO]
FROM Tracy
WHERE (((Tracy.[START DATE])>=[Enter date])) OR (((Tracy.[MID POINT])=[START
DATE]))
GROUP BY Tracy.NAME;
 
Hi Karl,

Thank you for getting back to me.

I pasted your code into the control source. I am getting an error message
"the expression you entered contains invalid syntax" Any ideas on how to fix
it. I am afraid I don't know enough to figure it out on my own. I did try
with no luck.

Tracy

KARL DEWEY said:
Does this do it for you?
SELECT Tracy.NAME, Sum(Tracy.[SEMESTER ONE]) AS [SumOfSEMESTER ONE],
Sum(Tracy.[SEMESTER TWO]) AS [SumOfSEMESTER TWO]
FROM Tracy
WHERE (((Tracy.[START DATE])>=[Enter date])) OR (((Tracy.[MID POINT])=[START
DATE]))
GROUP BY Tracy.NAME;

--
KARL DEWEY
Build a little - Test a little


Tracy said:
The field names and datatypes are: NAME (TEXT), START DATE (DATE/TIME),
SEMESTER ONE (CURRENCY), MID POINT (DATE/TIME), SEMESTER TWO (CURRENCY). I
would like the report to give me a total of what a student was charged if
they started on a specific date plus, what a student was charged for second
semester if they started their midpoint on the same date as the start date.
I will be closing up shop shortly. I am on the east coast. So if I don't
respond to you today, please look for me tomorrow.

Thank you so much,

Tracy
 
Back
Top