Check box problem.... (1 Viewer)

raghuprabhu

Registered User.
Local time
Yesterday, 17:37
Joined
Mar 24, 2008
Messages
154
I have a small database. In the form I have a check box called chkAddToTaxZone. I set the default value -1.

Code:
Private Sub chkAddToTaxZone_AfterUpdate()
    If chkAddToTaxZone Then
        Me.NoOfDays = NoOfDays
        Me.FNTotal = FNTotal
    Else
        Me.NoOfDays = (-1) * NoOfDays
        Me.FNTotal = (-1) * FNTotal
    End If
    Me.Requery
End Sub

Basically I want it to change the value of two calculated fields from positive to negative when the check box value is 0.

When I check the value again, the values in these two calculated field does not change. I have to do it a few things. What am I missing?

Thank you

Raghu
 

raghuprabhu

Registered User.
Local time
Yesterday, 17:37
Joined
Mar 24, 2008
Messages
154
spikepl Thank you very much.

Code:
Private Sub chkAddToTaxZone_AfterUpdate()
        Me.NoOfDays = (-1) * NoOfDays
        Me.FNTotal = (-1) * FNTotal
        Docmd.save
End Sub
This code is doing what I want it to do...

Is doing
 

Users who are viewing this thread

Top Bottom