Problems with checkboxes

simonI

Registered User.
Local time
Today, 14:46
Joined
Dec 22, 2005
Messages
25
i have checkboxes on a form and want to run a query based on the amount of times the checkbox(es) have been selected...

i have done this and attached a report however because the value of the checkboxes is -1 obviuosly the sum of this is a negative number and so on the report the total selcted is negative....

is there a way to change these to positive numbers...

and if so where do you put it.

cheers in advance

Si
 
Just put it in the abs() function?
 
yes i thought that - similar to excel - but i havent the foggiest where to put it...
 
simonI said:
but i havent the foggiest where to put it...

You can place it either in the query your report is based on, or in the report itself.

Report Field:
Code:
=Abs([YourChkBoxField])

Query Field:
Code:
YourFieldName: Abs([YourChkBoxField])
 
i have created both of these using the wizard.. and i cant find anywhere to put the code....

i have tried to use the expression builder in the control source of where the number appears on the form but it keeps giving me syntax errors

this is a portion of the SQL code that the query uses..

Code:
SELECT DISTINCTROW Sum([Module selection Table].[International Business 1]) AS [Sum Of International Business 1], Sum([Module selection Table].[Business Programming 1]) AS [Sum Of Business Programming 1],

is there an easier way
 
thanks i sorted it by just multiplying the SQL sum thingy by -1 and it seems to work..
 

Users who are viewing this thread

Back
Top Bottom