I have a main form ‘frmUpdateTraining’ and a sub form ‘subfrmTrainingTimes’ which is a continuous form.
On the main form there are (amongst others) 2 fields ‘DateCompleted’ and ‘TrainedBy’
On the sub form there a 3 text fields ‘TrainingDate’, ‘StartTime’ and ‘EndTime’.
When a user enters a time in the ‘StartTime’ text field, I would like the text fields ‘DateCompleted’ and ‘TrainedBy’ on the main form to either become visible or enabled.
The code that I have used is in the BeforeUpdateEvent is
I am struggling with my coding to achieve this; can someone please help.
On the main form there are (amongst others) 2 fields ‘DateCompleted’ and ‘TrainedBy’
On the sub form there a 3 text fields ‘TrainingDate’, ‘StartTime’ and ‘EndTime’.
When a user enters a time in the ‘StartTime’ text field, I would like the text fields ‘DateCompleted’ and ‘TrainedBy’ on the main form to either become visible or enabled.
The code that I have used is in the BeforeUpdateEvent is
Code:
If IsNull(Me.StartTime) Then
Me.([frmUpdateTraining]![DateCompleted]).Visible = False
Me.([frmUpdateTraining]![TrainedBy]) = False
Else
Me.([frmUpdateTraining]![DateCompleted]).Visible = False
Me.([frmUpdateTraining]![TrainedBy]) = False
End If
I am struggling with my coding to achieve this; can someone please help.