Visible property

schumarg

Registered User.
Local time
Today, 18:47
Joined
May 13, 2003
Messages
94
Hi,

This is a bit perplexing. I have a calendar control on a form that is hidden, calendar.visible=false, when form is loaded.

What I would like to do is unhide the calendar when I tab to the date field, then select a date, fill the date field and then hide the calendar again.

Seems simple, but I get a run time error "2110", The control's Visible property may be set to No.

Seems like a catch 22.

Is there a work around. I've tried setting visible = True, but is appears that in order to change the control the visible property needs to be true. ?????

Thanks in advance,
Bob
 
i am assuming you are using the click event for the calender to set your date field and then hide the calender
you cant hide a control that has the focus therefor to hide
the calender set your date field,move the focus to the next control
then use the calenders visible property

eg
me.yourdatefield=me.calendername.value
me.nextcontrolname.setfocus
me.calendername=false
 

Users who are viewing this thread

Back
Top Bottom