T
Tony Williams
I have a datasheet form, that is on a tabcontrol, that has 3 controls
ActionDate (Default value is Date())and ActionTime Default value is Time())
and Action Log (which is a text box). All the controls have their their
locked property set to Yes. I also have this code in the OnCurrent Event of
the form:
Private Sub Form_Current()
If Me.NewRecord Then
Me.Action_Date.Locked = False
Else
Me.Action_Date.Locked = True
End If
If Me.NewRecord Then
Me.Action_Time = False
Else
Me.Action_Time.Locked = True
End If
If Me.NewRecord Then
Me.Action_Log.Locked = False
Else
Me.Action_Log.Locked = True
End If
End Sub
When the form opens the date and time are present. However as soon as I
start to type into the text box which is the Action Log control the time
reverts to 00:00:00. The date stays as it should ie todays date.
Does anyone know why this is happening?
Thanks
Tony
ActionDate (Default value is Date())and ActionTime Default value is Time())
and Action Log (which is a text box). All the controls have their their
locked property set to Yes. I also have this code in the OnCurrent Event of
the form:
Private Sub Form_Current()
If Me.NewRecord Then
Me.Action_Date.Locked = False
Else
Me.Action_Date.Locked = True
End If
If Me.NewRecord Then
Me.Action_Time = False
Else
Me.Action_Time.Locked = True
End If
If Me.NewRecord Then
Me.Action_Log.Locked = False
Else
Me.Action_Log.Locked = True
End If
End Sub
When the form opens the date and time are present. However as soon as I
start to type into the text box which is the Action Log control the time
reverts to 00:00:00. The date stays as it should ie todays date.
Does anyone know why this is happening?
Thanks
Tony