If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Trouble with DCount
I have 5 check boxes on a form. I would like to calculate
how complete the form is based on the number of check boxes checked (i.e. all 5 boxes checked =100%). How can I do this? I keep getting an #Error message. |
#2
|
|||
|
|||
Trouble with DCount
On Tue, 8 Jun 2004 07:16:34 -0700, "Todd"
wrote: I have 5 check boxes on a form. I would like to calculate how complete the form is based on the number of check boxes checked (i.e. all 5 boxes checked =100%). How can I do this? I keep getting an #Error message. A checkbox is actually a way of displaying the values TRUE = -1 or FALSE = 0; so you should be able to set the Control Source of a textbox to =(- NZ([chkA]) - nz([chkB]) - nz([chkC]) - nz([chkD]) - nz([chkE]))/5 Set the format of the textbox to Percent and it should display the desired result. You may need to Recalc the form in the afterupdate event of each checkbox. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#3
|
|||
|
|||
Trouble with DCount
Thank you very much John, you were right on!
Todd -----Original Message----- On Tue, 8 Jun 2004 07:16:34 -0700, "Todd" wrote: I have 5 check boxes on a form. I would like to calculate how complete the form is based on the number of check boxes checked (i.e. all 5 boxes checked =100%). How can I do this? I keep getting an #Error message. A checkbox is actually a way of displaying the values TRUE = -1 or FALSE = 0; so you should be able to set the Control Source of a textbox to =(- NZ([chkA]) - nz([chkB]) - nz([chkC]) - nz([chkD]) - nz ([chkE]))/5 Set the format of the textbox to Percent and it should display the desired result. You may need to Recalc the form in the afterupdate event of each checkbox. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public . |
Thread Tools | |
Display Modes | |
|
|