Group options/check boxes and field calcualtions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I need to calculate a field using a choice of 1 out of 4 available check boxes in a group
Field example: Rent/Mortgage $100 Check box options are: paid Weekly (*4.3333), Monthly (*1), Bi-Monthly (*2.1666) OR Annual (/12). Can this be done in a form, or is this a hopeless case? I hope my question is clear. Thank you for taking the time to read this message
 
dim coeff as Double
coeff = cbWeekly * 4.3333 + cbMonthly + cbBiMonthly * 2.1666 + cbAnnual
* 12
txtRentMortgage.Value = fieldRentMortgage * (-coeff)

where cbXXX are your check boxes and txtRentMortgage is the text box to
show the result. Make sure the check boxes are exclusive.
Pavel
 
I am having difficulty in figuring out what to do.
I have an option group "Frame531" which includes these
four check boxes: "check534, check536, check538 &
check540" Each of these check boxes have a
label: "Label535" which I have put the
caption "Weekly", "Label537" with the caption "Monthly",
etc.
I currently have a field in which the amount is entered.
This field, and it's label both are named "Rent/Mortgage".
I have another field named "calculated Rent/Mortgage".
Could you tell me where I need to put what in order to get
the results I need?
Thank you,
Gail
-----Original Message-----
dim coeff as Double
coeff = cbWeekly * 4.3333 + cbMonthly + cbBiMonthly * 2.1666 + cbAnnual
* 12
txtRentMortgage.Value = fieldRentMortgage * (-coeff)

where cbXXX are your check boxes and txtRentMortgage is the text box to
show the result. Make sure the check boxes are exclusive.
Pavel
are: paid Weekly (*4.3333), Monthly (*1), Bi-Monthly
(*2.1666) OR Annual (/12). Can this be done in a form, or
is this a hopeless case? I hope my question is clear.
Thank you for taking the time to read this message.
 
Back
Top