More info on Yes and No and negative numbers

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

Guest

Earlier I got some great help. It did the trick
except I have one more challenge. I made a queriew
where I summed up the -1's. I then made a subreport based
on the querie...so ABS and -Sum won't work. Here is the following code
generated in the subreport because of the query.

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], [Per 1 Attendance].[SumOfattended], [Per 1
Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

SO... how do I get SumOfattended to be Positive in the code above.
Once again thanks in advance.
Ken
 
have you tried....

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], Abs([Per 1 Attendance].[SumOfattended]), [Per
1 Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

or...

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], Abs([Per 1 Attendance].[SumOfattended]) as
ABSSUMATTENDED, [Per 1 Attendance].[SumOfNo Show] FROM [Per 1 Attendance]



I don't know if they will work, but I would give it a try and see what
happens.
 
Neither one worked. Thanks though.

Rick B said:
have you tried....

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], Abs([Per 1 Attendance].[SumOfattended]), [Per
1 Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

or...

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], Abs([Per 1 Attendance].[SumOfattended]) as
ABSSUMATTENDED, [Per 1 Attendance].[SumOfNo Show] FROM [Per 1 Attendance]



I don't know if they will work, but I would give it a try and see what
happens.



KenRamoska said:
Earlier I got some great help. It did the trick
except I have one more challenge. I made a queriew
where I summed up the -1's. I then made a subreport based
on the querie...so ABS and -Sum won't work. Here is the following code
generated in the subreport because of the query.

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], [Per 1 Attendance].[SumOfattended], [Per 1
Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

SO... how do I get SumOfattended to be Positive in the code above.
Once again thanks in advance.
Ken
 
Earlier I got some great help. It did the trick
except I have one more challenge. I made a queriew
where I summed up the -1's. I then made a subreport based
on the querie...so ABS and -Sum won't work. Here is the following code
generated in the subreport because of the query.

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], [Per 1 Attendance].[SumOfattended], [Per 1
Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

SO... how do I get SumOfattended to be Positive in the code above.
Once again thanks in advance.
Ken

Take it back one step further. It would appear that [Per 1 Attendance]
is a Totals query with a field

SumOfAttended: Sum([Attended])

Change this field to

SumOfAttended: Sum(Abs([Attended]))


John W. Vinson[MVP]
 
John is so smart!



John Vinson said:
Earlier I got some great help. It did the trick
except I have one more challenge. I made a queriew
where I summed up the -1's. I then made a subreport based
on the querie...so ABS and -Sum won't work. Here is the following code
generated in the subreport because of the query.

SELECT [Per 1 Attendance].[DateClass], [Per 1 Attendance].[ClassName], [Per
1 Attendance].[CountOfLname], [Per 1 Attendance].[SumOfattended], [Per 1
Attendance].[SumOfNo Show] FROM [Per 1 Attendance]

SO... how do I get SumOfattended to be Positive in the code above.
Once again thanks in advance.
Ken

Take it back one step further. It would appear that [Per 1 Attendance]
is a Totals query with a field

SumOfAttended: Sum([Attended])

Change this field to

SumOfAttended: Sum(Abs([Attended]))


John W. Vinson[MVP]
 
Back
Top