PC Review


Reply
Thread Tools Rate Thread

changing the date in a calender control.

 
 
=?Utf-8?B?U3RlZmFu?=
Guest
Posts: n/a
 
      30th Apr 2006
Hi,

I've got a calender (calender control 8.0) on my form. But the date on it
doesn't change. It stays at the date when i putted it on my form.

How can i make it so that everytime i open this form, the calender begins at
the current day.

me.calender2.value = date doesn't work

The same if i use the monthview.


--
thanks,
Stefan
 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      1st May 2006
The statement should work fine.

I have a similar statement:

Me.acxCalendar.Value = Date

in the Form_Current Event and it worked fine.

In addition, the Calendar Control (at least in Calendar 10 which I checked)
has the method Today which you can use to set the value of the Calendar
Control to today's date.

--
HTH
Van T. Dinh
MVP (Access)



"Stefan" <123@abc> wrote in message
news:8B5CE132-7D47-4B93-83BC-(E-Mail Removed)...
> Hi,
>
> I've got a calender (calender control 8.0) on my form. But the date on
> it
> doesn't change. It stays at the date when i putted it on my form.
>
> How can i make it so that everytime i open this form, the calender begins
> at
> the current day.
>
> me.calender2.value = date doesn't work
>
> The same if i use the monthview.
>
>
> --
> thanks,
> Stefan



 
Reply With Quote
 
=?Utf-8?B?U3RlZmFu?=
Guest
Posts: n/a
 
      1st May 2006
> The statement should work fine.
>
> I have a similar statement:
>
> Me.acxCalendar.Value = Date
>
> in the Form_Current Event and it worked fine.
>
> In addition, the Calendar Control (at least in Calendar 10 which I checked)
> has the method Today which you can use to set the value of the Calendar
> Control to today's date.
>


Thanks,

I have replaced the calender object to a new one without rename it, and it
works now.

--
Stefan
 
Reply With Quote
 
RD
Guest
Posts: n/a
 
      1st May 2006
On Sun, 30 Apr 2006 08:47:01 -0700, Stefan <123@abc> wrote:

>Hi,
>
>I've got a calender (calender control 8.0) on my form. But the date on it
>doesn't change. It stays at the date when i putted it on my form.
>
>How can i make it so that everytime i open this form, the calender begins at
>the current day.
>
>me.calender2.value = date doesn't work
>
>The same if i use the monthview.


I found the MS DateTime Picker to be a PITA to use. I ended up just putting a
good input mask on on a text box. If you really want to use a date picker try
this one from Brendan Kidwell. It's pretty sharp and works well.

http://www.glump.net/dokuwiki/softwa...ss_date_picker

HTH,
RD

 
Reply With Quote
 
=?Utf-8?B?SmltIEJ1cmtlIGluIE5vdmk=?=
Guest
Posts: n/a
 
      2nd May 2006
I use the calendar control with no problems. You have to set the focus to the
calendar to assign a value to it, and have to reference it as
Cal.Object.Value. Here's an example, where my Calendar control is called
calDOS (curDate is a field I defined in my app that is set to the current
date):

calDOS.SetFocus
calDOS.Object.Value = curDate + 1

Also, if you want to use a calendar's events, only a small number of them
show up by default in the code window. I ended up having to create an event
called CalDOS_AfterUpdate to trigger an event after the value is changed -
the drop-down list of events for the calendar control doesn't show
AfterUpdate or BeforeUpdate by default for some reason. Once you add it
yourself it will show up in the drop-down list.

"Stefan" wrote:

> Hi,
>
> I've got a calender (calender control 8.0) on my form. But the date on it
> doesn't change. It stays at the date when i putted it on my form.
>
> How can i make it so that everytime i open this form, the calender begins at
> the current day.
>
> me.calender2.value = date doesn't work
>
> The same if i use the monthview.
>
>
> --
> thanks,
> Stefan

 
Reply With Quote
 
=?Utf-8?B?U3RlcGhlbiBFbmdsaXNo?=
Guest
Posts: n/a
 
      17th Jun 2006
Thanks Jim. So simple when you get a clue! We have struggled with this for
2 hours - and we had it working on another form - don't know why!
Cheers
Stephen

"Jim Burke in Novi" wrote:

> I use the calendar control with no problems. You have to set the focus to the
> calendar to assign a value to it, and have to reference it as
> Cal.Object.Value. Here's an example, where my Calendar control is called
> calDOS (curDate is a field I defined in my app that is set to the current
> date):
>
> calDOS.SetFocus
> calDOS.Object.Value = curDate + 1
>
> Also, if you want to use a calendar's events, only a small number of them
> show up by default in the code window. I ended up having to create an event
> called CalDOS_AfterUpdate to trigger an event after the value is changed -
> the drop-down list of events for the calendar control doesn't show
> AfterUpdate or BeforeUpdate by default for some reason. Once you add it
> yourself it will show up in the drop-down list.
>
> "Stefan" wrote:
>
> > Hi,
> >
> > I've got a calender (calender control 8.0) on my form. But the date on it
> > doesn't change. It stays at the date when i putted it on my form.
> >
> > How can i make it so that everytime i open this form, the calender begins at
> > the current day.
> >
> > me.calender2.value = date doesn't work
> >
> > The same if i use the monthview.
> >
> >
> > --
> > thanks,
> > Stefan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender) and get it displayed in date formate in a textbox for departure date? Amanda Microsoft VB .NET 2 10th Oct 2006 06:52 AM
How to use Calender control as date chooser in excel?? =?Utf-8?B?UmFrZXNo?= Microsoft Excel Misc 2 25th May 2006 04:33 PM
Calendar Control Changing System Date rob_parkhill Microsoft Excel Programming 3 22nd May 2006 09:29 PM
How(link a calender control to a text box to except a date range) =?Utf-8?B?bWFkaXNvbg==?= Microsoft Access Form Coding 2 22nd Apr 2006 03:56 PM
Outlook View Control - Changing the Calender View programatically Ryan Hubbard Microsoft Outlook Form Programming 1 7th Aug 2004 10:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 PM.