ActiveX Calandar Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using an ActiveX Calandar Control in one of my forms. When the user
clicks the textbox the calandar becomes visible. After the user selects a
date I would like the textbox to store the calendar value. I can't get it to
work right. Here is what I have....

Private Sub txtStartDate_Click()
Me.calendarStartDate.Visible = True
End Sub

Private Sub calendarStartDate_Enter()
Me.txtStartDate = Me.calendarStartDate.Value
Me.txtStartDate.SetFocus
Me.calendarStartDate.Visible = False
End Sub

With this code as soon as you click anywhere on the calendar it turns
invisible and the date in the textbox doesn't change. Anyone know how to
properly code this?

thanks in advance.
 
Try changing the calendarStartDate_Enter() to calendarStartDate_Click()

Although there isn't a Click event listed for calendars, this has worked for
me in the past.
 
There isn't an Event Click for this control.

Bill Tibbetts said:
Try changing the calendarStartDate_Enter() to calendarStartDate_Click()

Although there isn't a Click event listed for calendars, this has worked for
me in the past.
 
I know...just manually change the code to calendarStartDate_Click()

Try it! You'll like it!
 
Wow I do like it, thanks it works great!

Bill Tibbetts said:
I know...just manually change the code to calendarStartDate_Click()

Try it! You'll like it!
 
I just found your post regarding this technique. It helped solve several
irritating problems I was having with calendar controls.

Thanks so much for sharing this -- it saved me a lot of time!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top