check boxes

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

Guest

i want to make it so if a check box is checked then a certain amount is
automatically added in another field, and if not checked the amount will be
0. How do i link the two fields together so the check box (yes/no) will
determine the answer in the other field?
 
You can do it in the Click event handler. Set the value manually:

If Me.<checkbox> then
<otherControl> = <value>
Else
<otherControl> = 0
End If

of course, you'll have to replace the stuff in <> with the names of your
controls

HTH

--
Rebecca Riordan, MVP

Seeing Data: Designing User Interfaces
Designing Relational Database Systems, 2nd Edition
www.awprofessional.com

Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step
www.microsoft.com/mspress
 
i want to make it so if a check box is checked then a certain amount is
automatically added in another field, and if not checked the amount will be
0. How do i link the two fields together so the check box (yes/no) will
determine the answer in the other field?

On the Form, you can code the CheckBox AfterUpdate event:
If Me![CheckBoxName] = True Then
[SomeControl] = 25 ' or whatever
Else
[SomeControl] = 0
End If
 
Back
Top