use enter key to select date on calendar

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

Guest

I'm using MSCalendar .11. When I need a date I set a textbox = to a function
in a standard mod which opens a form called PickADate. That sets a global
variable to the value and returns it thru the function. I would like to
select the date on the calendar control using the enter key instead of
having to click on it with the mouse. I've tried putting an OK cmd button
on the form and this works ok but I have to press the enter key twice. Is
there a way to use the enter key directly on the Calendar control to activate
some code? I've experimented using the keypress event and the lostfocus but
I can't get it to work. I'm hoping that there is just some property I need
to set or something.??? Thanx
 
Hi Gil

I haven't tried this with the calendar control but you can quickly try it.

In desing view go to the command button you want to have function when you
press enter. Go to the default property and change it to "yes"

Hope this helps, not sure if it will

Ray
 
Ray, thanx for response,
The whole point is to NOT have a command button on my PickADate form. What
it does now when I click on a date, is set the Global variable to the value
of the Calendar and then close the form with the calendar control on it.
Instead of clicking on the calendar I would like to use the arrow keys to
highlight a date and then just press the enter key and have it do the same
thing as the click event. If this cannot be done I would like to know this
too as it has been frustrating trying to figure it out. Should I stick with
the OK command button??
 
Back
Top