G
Guest
I am just taking my first faltering footsteps in VBA.
I have a combo box from which a medical professional is selected (doctor,
nurse etc). Adjacent to it there is a text box which holds the date on which
this professional was referred to but I only want the control visible when
the combo box is not blank.
The after update procedure I put in the combo box works fine. Coding as
follows:
Private Sub cboReferredTo_AfterUpdate()
If txtReferredTo = Null Then
Me!dteReferredTo.Visible = False
Else
Me!dteReferredTo.Visible = True
End If
End Sub
However, when I exit the record and come back to it the text box is hidden.
I've either put the procedure in the wrong place or I need some further
coding somewhere
I have a combo box from which a medical professional is selected (doctor,
nurse etc). Adjacent to it there is a text box which holds the date on which
this professional was referred to but I only want the control visible when
the combo box is not blank.
The after update procedure I put in the combo box works fine. Coding as
follows:
Private Sub cboReferredTo_AfterUpdate()
If txtReferredTo = Null Then
Me!dteReferredTo.Visible = False
Else
Me!dteReferredTo.Visible = True
End If
End Sub
However, when I exit the record and come back to it the text box is hidden.
I've either put the procedure in the wrong place or I need some further
coding somewhere