My table has the field defined as number, and in form i input a value. I have an OnChange subroutine that tries to look at this field, and if the value > 0 to turn on a check box. however it does not work.
'if family leave hours are present turn on chkFamLeaveFlag
Private Sub txtFamLeaveHrs_Change()
Dim dblValue As Double
dblValue = 0
dblValue = Me.txtFamLeaveHrs.Value
If dblValue > 0 Then
Me.chkFamLeave = True
Me.txtTestValue = dblValue
End If
Me.lblTestInSub.Visible = True
End Sub
is there something about the table def being numeric, and the text box always being character and having to convert the value of the text box to numbers before doing a compare...i don't get an error this way so not sure why the test result of dblValue is always zero even in the text box shows an input of 5 for example.
thanks
'if family leave hours are present turn on chkFamLeaveFlag
Private Sub txtFamLeaveHrs_Change()
Dim dblValue As Double
dblValue = 0
dblValue = Me.txtFamLeaveHrs.Value
If dblValue > 0 Then
Me.chkFamLeave = True
Me.txtTestValue = dblValue
End If
Me.lblTestInSub.Visible = True
End Sub
is there something about the table def being numeric, and the text box always being character and having to convert the value of the text box to numbers before doing a compare...i don't get an error this way so not sure why the test result of dblValue is always zero even in the text box shows an input of 5 for example.
thanks