Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar control after update focus

Status
Not open for further replies.

nastar1

Technical User
Nov 1, 2005
122
US
I'm finding that after a user clicks a date in the Calendar Control 11.0, the focus goes to the first tabbed field on the form rather than the next tabbed control in order.

I'm pretty convinced it is one of the glitches with the calendar control, but wonder if there is any way to brute force the focus to where I need it to go.

Currently there is no code at all attached to the Calendar Control.
I only have the following events coded for the associated text box called txtStart:
Private Sub txtStart_GotFocus()
ocxWAStart.Visible = True
End Sub

Private Sub txtStart_LostFocus()
ocxWAStart.Visible = False
End Sub

Private Sub txtStart_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ocxWAStart.Value = txtStart.Value
End Sub

The name of the Calendar Control is ocxWAStart.

I prefer to stick with using the Calendar Control rather than the other substitutes I've seen because I do not need all the extra buttons, etc. that are typically included in the others.

One other glitch I've also noticed with the Calendar Control is that after I started monkeying around with trying to code events to it, the Year and Month drop down boxes within the control no longer function. If the user clicks them the control behaves as if an On Click has fired and the focus is returned to the first tabbed field on the form. The same behaviour as when the user clicks a date on the control. Very weird.
 
Disregard.

I'm convinced the Calendar Control is just too buggy to stick with and opted to go with the AllenBrowne calendar control. It works as advertised.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top