Solved Counting Checkboxes with True Value (1 Viewer)

basilyos

Registered User.
Local time
Today, 03:01
Joined
Jan 13, 2014
Messages
252
hello i have 4 checkboxes in continuous form
i want to get the sum of each checkbox with true value in an unbound texbox
i tried these codes
Code:
=Sum(IIf(Nz([chk_Gift];False); 1; 0))
Code:
=-Sum([chk_Gift])
Code:
=Abs(Sum([chk_Gift]))

but always am getting error any help please
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:01
Joined
Feb 19, 2002
Messages
42,981
=Abs(Sum([chk_Gift]))
This is the correct syntax. The control belongs in the footer of the continuous form.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:01
Joined
Feb 28, 2001
Messages
27,001
This would occur if for some reason the field [chk_Gift] is not visible in that context. Is the field chk_Gift part of the .RecordSource of the form?
 

basilyos

Registered User.
Local time
Today, 03:01
Joined
Jan 13, 2014
Messages
252
This would occur if for some reason the field [chk_Gift] is not visible in that context. Is the field chk_Gift part of the .RecordSource of the form?
the chk_Gift is visible and yes it's part of the record source
 

basilyos

Registered User.
Local time
Today, 03:01
Joined
Jan 13, 2014
Messages
252
Hey Guys this is a mini copy of my database just one table and the form where am facing the problem

thanks in advance
 

Attachments

  • FrontEnd.accdb
    1.2 MB · Views: 113

mike60smart

Registered User.
Local time
Today, 10:01
Joined
Aug 6, 2017
Messages
1,899
Hey Guys this is a mini copy of my database just one table and the form where am facing the problem

thanks in advance
It would help if you used the actual Control names as shown below:-
 

Attachments

  • Count.JPG
    Count.JPG
    29.4 KB · Views: 103

basilyos

Registered User.
Local time
Today, 03:01
Joined
Jan 13, 2014
Messages
252
Ohhh am really an idiot 🤦‍♂️🤦‍♂️🤦‍♂️
I typed the name of the name of the control not the control source

Am really sorry and thanks
 

Users who are viewing this thread

Top Bottom