We have a form called Animal Intake
On the Form called Animal Intake we have three fields that are Yes/ 
No check boxes.

Those three fields are called Rabies, Sterlization, Nail. Those three 
fields should have a $ amount associated with each one.

When the boxes are checked yes, we want them to tally up at the 
bottom of the form.

Have a field in the table/form called sngtotal just to have a field 
with a control source to tally in, but that didn't work.

Below is code. What am i doing incorrectly? or any input is 
appreciated.

Option Compare Database

Private Sub Form_AfterUpdate()

   'Cost of procedures on animal intake form. Declaring Variables.
   Dim sngTotal As Single
   Dim sngRabies As Single
   Dim sngSpay As Single
   Dim sngNail As Single
   'Input amounts from boxes checked True on Intake Form.
   If (Rabies = True) Then sngRabies = 12
   If (Nail = True) Then sngNail = 2
   If (Sterlization = True) Then sngSpay = 63
   'Calculate the procedures.
   sngTotal = sngRabies + sngSpay + sngNail
End Sub







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessVBACentral/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to