A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Trouble with DCount



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2004, 03:16 PM
Todd
external usenet poster
 
Posts: n/a
Default 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  
Old June 8th, 2004, 06:26 PM
John Vinson
external usenet poster
 
Posts: n/a
Default 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  
Old June 9th, 2004, 12:31 PM
todd
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.