M
myspareone
Hi,
I am designing a form that keeps track of days that support has been
provided to different organisations and have created a checkbox for
each day of the month and have them laid out in a calendar type array.
because there are three organisations we regularly work with i have
created specific boxes for them (ie Company1_1 thru Company1_31,
Company2_1 thru Company2_31 etc) and am showing them all on the page.
im using the following rule to update totals:
=================================
In the AfterUpdate event of each of the checkboxes, put:
Me.txtTotal = Abs(Me.chkbox1 + ... ... + Me.chkbox7)
where txtTotal is the name of the text box where you want to show the
total.
Because a checkbox returns 0 or -1, you need Abs() to give a positive
result. Because you probably want the total to change as you
check/uncheck boxes, you need to put the code in each checkbox's code.
==============================
This works perfectly when I only have these three companies showing.
When i try to create another monthly calendar that will allow us to add
in the name of another organisation (Org1 thru Org31) the script will
not recognise it.
Is there another more efficient way of doing this?
I am designing a form that keeps track of days that support has been
provided to different organisations and have created a checkbox for
each day of the month and have them laid out in a calendar type array.
because there are three organisations we regularly work with i have
created specific boxes for them (ie Company1_1 thru Company1_31,
Company2_1 thru Company2_31 etc) and am showing them all on the page.
im using the following rule to update totals:
=================================
In the AfterUpdate event of each of the checkboxes, put:
Me.txtTotal = Abs(Me.chkbox1 + ... ... + Me.chkbox7)
where txtTotal is the name of the text box where you want to show the
total.
Because a checkbox returns 0 or -1, you need Abs() to give a positive
result. Because you probably want the total to change as you
check/uncheck boxes, you need to put the code in each checkbox's code.
==============================
This works perfectly when I only have these three companies showing.
When i try to create another monthly calendar that will allow us to add
in the name of another organisation (Org1 thru Org31) the script will
not recognise it.
Is there another more efficient way of doing this?