G
Guest
Will someone please explain why the Setfocus in the MIInit sub respnds with
an error can't move the f0ocus to the control MIDate.
The intent is to force the user date to enter a correct date.
Private Sub MIDate_GotFocus()
Me.ThisCntrol = Me.ActiveControl.Name
Me.MyCalendar = Date
Me.MyCalendar.Visible = True
Me.MyCalendar.SetFocus
End Sub
Private Sub MIInit_GotFocus()
Me.MyCalendar.Visible = False
If Me.MIDate < Me.IssueDate Then
MsgBox "Submit Date " & Me.MIDate & " Is less than Issue Date of " &
Me.IssueDate, 16, "Critical Error"
Me.MIDate.SetFocus
End If
End Sub
TIA
Lee
an error can't move the f0ocus to the control MIDate.
The intent is to force the user date to enter a correct date.
Private Sub MIDate_GotFocus()
Me.ThisCntrol = Me.ActiveControl.Name
Me.MyCalendar = Date
Me.MyCalendar.Visible = True
Me.MyCalendar.SetFocus
End Sub
Private Sub MIInit_GotFocus()
Me.MyCalendar.Visible = False
If Me.MIDate < Me.IssueDate Then
MsgBox "Submit Date " & Me.MIDate & " Is less than Issue Date of " &
Me.IssueDate, 16, "Critical Error"
Me.MIDate.SetFocus
End If
End Sub
TIA
Lee