Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / March 2004

Tip: Looking for answers? Try searching our database.

Pop up Calendar Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Claire - 24 Mar 2004 00:34 GMT
Hi

I have an issue with a pop up calendar, Active X Class: Mscal.Calendar.7.

The calendar becomes visible by clicking a command button. When the calendar
is visible, if the user clicks on the edge (border area) of the calendar
control the date of December 30, 1899 is entered into the corresponding text
box.

Any ideas how to stop this? Or at least make it enter today's date?

Thanks
Claire
Alex Dybenko - 24 Mar 2004 16:56 GMT
try to set calendar date in form's onload event:
me.mycalendar.object.value=date()

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi
>
[quoted text clipped - 9 lines]
> Thanks
> Claire
Claire - 25 Mar 2004 05:35 GMT
Hi Alex:

I don't think I can use this option because:

1. There are seven different calendar objects that might not all need to be
filled in so I would prefer not to set the value if I don't have to.
2. The code does not stop the problem of clicking on the border of the
calendar object and having the invalid date show up.

I think the user clicked on the border to try to close the calendar without
actually entering a date. I have worked around that by adding code to all of
the text box OnClick events so that they can click in there to close the
calendar. However, the border thing is still a concern (and an annoyance)
that I would like to clear up if possible.

Any ideas? or is this just one of those issues.......

Thanks
Claire

try to set calendar date in form's onload event:
me.mycalendar.object.value=date()

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi
>
> I have an issue with a pop up calendar, Active X Class: Mscal.Calendar.7.
>
> The calendar becomes visible by clicking a command button. When the
calendar
> is visible, if the user clicks on the edge (border area) of the calendar
> control the date of December 30, 1899 is entered into the corresponding
text
> box.
>
> Any ideas how to stop this? Or at least make it enter today's date?
>
> Thanks
> Claire
Alex Dybenko - 25 Mar 2004 14:13 GMT
ok, then try the folowing - in OnClick event you check what value calendar
returns:
if  nz(me.mycalendar.object.value,0)=0 then
   'do nothing if date=0 or null
else
   mytextbox=me.mycalendar.object.value
end if

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi Alex:
>
[quoted text clipped - 34 lines]
> > Thanks
> > Claire
Claire - 27 Mar 2004 00:06 GMT
Hey Alex I think you've got it!!

Thanks a bunch!
Claire
>-----Original Message-----
>ok, then try the folowing - in OnClick event you check what value calendar
[quoted text clipped - 49 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.