I am having trouble getting code to work for a calendar. When I click in the text box it brings the calendar up, but when I select a date I get the error message:
Microsoft Access can't move the focus to the control Date Received(txt box).
Here is the code:
Private Sub Date_Received_Enter()
' Show Calendar and set its date.
Calendar.Visible = True
Calendar.SetFocus
' Set to today if Date Received has no value.
'Calendar.Value = IIf(IsNull(Date_Received), Date, Date_Received.Value)
End Sub
Private Sub Calendar_Click()
Date_Received.Value = Calendar.Value
Date_Received.SetFocus
Calendar.Visible = False
End Sub
Any Suggestions?
Microsoft Access can't move the focus to the control Date Received(txt box).
Here is the code:
Private Sub Date_Received_Enter()
' Show Calendar and set its date.
Calendar.Visible = True
Calendar.SetFocus
' Set to today if Date Received has no value.
'Calendar.Value = IIf(IsNull(Date_Received), Date, Date_Received.Value)
End Sub
Private Sub Calendar_Click()
Date_Received.Value = Calendar.Value
Date_Received.SetFocus
Calendar.Visible = False
End Sub
Any Suggestions?