Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 20th, 2005, 07:49 AM
Registered User
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default MSCAL. Calender.7

Can anyone help. I have a calender displaying each month in an access database form. The Calender however, is defaulting to a date which i have to specify. I would like a have a calender which shows the current date. (ie =now()). I am using class MSCAL.calender.7

Can anyone help??
Old January 23rd, 2005, 04:21 AM
Friend of Wrox
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

check your ctl default values for example

ctl.Year = Year(Now)
ctl.Month = Month(Now)
ctl.Day = Day(Now)

this is a sample I have from my cal.

Private Sub Form_Load()
Dim lkb As String
Dim ctl As Control
Set ctl = Me!CalDate
    lkb = "[apptDate] = #" & Format(Now(), "short date") & "#"

    Me.RecordsetClone.FindFirst lkb
    If Me.RecordsetClone.NoMatch = False Then
        Me.Bookmark = Me.RecordsetClone.Bookmark
        Me.RecordsetClone![ApptDate] = Format(Now(), "short date")
        Me.Bookmark = Me.RecordsetClone.Bookmark
        Me![CalDate] = Format(Now(), "short date")
        Me![txtDate] = Me![CalDate]
    End If

Me.CalDate.Value = lkb
ctl.Year = Year(Now)
ctl.Month = Month(Now)
ctl.Day = Day(Now)


End Sub
Jaime E. Maccou

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Calender Button kotaiah Excel VBA 0 September 21st, 2006 07:21 AM
calender event chandrasekhar ASP.NET 2.0 Professional 1 April 16th, 2006 11:32 PM
calender crmpicco Classic ASP Basics 2 March 23rd, 2005 01:21 PM
MSCAL.OCX narendrapawar VB Components 0 December 17th, 2004 01:44 PM
Calender gmoney060 Classic ASP Basics 4 August 23rd, 2004 12:10 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.