I have the code below, where if MTCEnd value is empty, it flags up a message box, shown remmed out. However on clicking the dialogue box, or remming it out iits inclusion in the procedure, I cannot get back focus to the control MTCEnd. If I rem out the setfocus line, and press the return key after exiting the dialogue box or without it if excluded, the focus returns to the control okay. The field is enabled and not locked. It has an input mask of 00:00:00:00 and is a bound field.
Any ideas, thanks
If IsNull(Me.MTCEnd) = True Then
MsgBox "Timecode End value not entered"
Me.MTCDuration.Visible = False
Me.Label20.Visible = False
Me.Accept1.Enabled = False
'Forms!mainform1!Subform1.Form.MTCEnd.SetFocus
'Me.MTCEnd.SetFocus
'Me.MTCEnd.Text = ""
Exit Sub
End If
Any ideas, thanks
If IsNull(Me.MTCEnd) = True Then
MsgBox "Timecode End value not entered"
Me.MTCDuration.Visible = False
Me.Label20.Visible = False
Me.Accept1.Enabled = False
'Forms!mainform1!Subform1.Form.MTCEnd.SetFocus
'Me.MTCEnd.SetFocus
'Me.MTCEnd.Text = ""
Exit Sub
End If