I have a form that has hours, minutes, and seconds as an imput.
Onlost and Onchange these update the [tot_secs] field with a calculation like so:
What I'm trying to do is to create an error message if the field [tot_secs] = 0
the field [tot_secs] is on my form but is not enabled and is locked.
The error form is called [SecsOn]
This is what I thought would work ?
Any thought or direction is greatly appreciated.
I am also aware that I'm robably approaching this in the wrong way!! again. Advice is humbly and generously accepted.
Onlost and Onchange these update the [tot_secs] field with a calculation like so:
Code:
Private Sub s_Change()
Me.tot_secs = (Me.h * 3600) + (Me.m * 60) + Me.s
End Sub
What I'm trying to do is to create an error message if the field [tot_secs] = 0
the field [tot_secs] is on my form but is not enabled and is locked.
The error form is called [SecsOn]
This is what I thought would work ?
Code:
Private Sub tot_secs_BeforeUpdate(Cancel As Integer)
If Me.tot_secs = 0 Then
DoCmd.OpenForm "SecsOn", acNormal, , , acFormReadOnly, acWindowNormal
End If
End Sub
Any thought or direction is greatly appreciated.
I am also aware that I'm robably approaching this in the wrong way!! again. Advice is humbly and generously accepted.