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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar control not behaving

Status
Not open for further replies.

wabtrainer

IS-IT--Management
Feb 4, 2002
66
GB
At the moment I have an ActiveX calendar control to set a date in a textbox control.
When a button is clicked the calendar opens and when a date is selected the calendar closes and the textbox is updated.
So whats the problem I hear you cry!
Well the user who uses it sometimes uses it on the day its opened, which is the default and the only way to close the calendar is by choosing a different day to the one that is showing. She would like to close the calendar by clicking the button that opened the calendar in the first place.
Here is all the code I have at the moment.
-------------------------------------------
Private Sub ActiveXCtl18_AfterUpdate()
Me!myDate = ActiveXCtl18.Value
Me!myDate.SetFocus
' Close the calendar after picking a new valid date
Me!ActiveXCtl18.Visible = False
End Sub
------------------------------------------
Private Sub cmdDate_Click()
Me!ActiveXCtl18.Value = Now
Me!ActiveXCtl18.Visible = True
End Sub
------------------------------------------
Any ideas??
If you want to be a bear:
Be a Grizzly!
 
WELL, I HOPE I UNDERSTOOD
JUST PUT AN INVISIBLE BUTTON UNDER THE OPEN CALENDARBUTTON
THAT COMES VISIBLE WHEN YOU OPEN THE CALENDAR.
WHEN CMDDATE IS VISIBLE CMDCLOSE IS NOT VISIBLE ETC ETC
I HOPE IT HELPS YOU
MARIO FROM ITALY


 
Many thanks for your input.
I was not thinking straight the morning I posted this!
I worked around it by using a toggle button instead of a command button!
I have also since then adapted a superb month calandar that is customisable from within access. It is in VB and available from:
If you want to be a bear:
Be a Grizzly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top