By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,009 Members | 2,821 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,009 IT Pros & Developers. It's quick & easy.

Lebans Calendar Control:Start At Current Date Not "1899"

P: n/a
I use the Lebans calendar control and love it; the only thing is that it
commonly starts out at the year 1899 rather than the current year. Is there
a way to specifically tell it to start at the current date instead?

Note: it does this fine if I'm using it in the context of a form's text box,
but I'm trying to use it on a module which is called, whereby the date
chosen is the date plugged into a variable. Everytime after I reset the
database and call it up again in code, it is starting out at 1899.

Otherwise I LOVE this calendar control.

Tips?

LRH
Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Are you passing a value for StartSelectedDate when you call the
ShowMonthCalendar function?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:Q74yb.16497$9O5.5451@fed1read06...
I use the Lebans calendar control and love it; the only thing is that it
commonly starts out at the year 1899 rather than the current year. Is there a way to specifically tell it to start at the current date instead?

Note: it does this fine if I'm using it in the context of a form's text box, but I'm trying to use it on a module which is called, whereby the date
chosen is the date plugged into a variable. Everytime after I reset the
database and call it up again in code, it is starting out at 1899.

Otherwise I LOVE this calendar control.

Tips?

LRH

Nov 12 '05 #2

P: n/a
This was the syntax in a form:

txtDate1 = ShowMonthCalendar(mc, Nz(Me.txtDate1, 1), , , , True)

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:dI******************@twister01.bloor.is.net.c able.rogers.com...
Are you passing a value for StartSelectedDate when you call the
ShowMonthCalendar function?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:Q74yb.16497$9O5.5451@fed1read06...
I use the Lebans calendar control and love it; the only thing is that it
commonly starts out at the year 1899 rather than the current year. Is

there
a way to specifically tell it to start at the current date instead?

Note: it does this fine if I'm using it in the context of a form's text

box,
but I'm trying to use it on a module which is called, whereby the date
chosen is the date plugged into a variable. Everytime after I reset the
database and call it up again in code, it is starting out at 1899.

Otherwise I LOVE this calendar control.

Tips?

LRH


Nov 12 '05 #3

P: n/a
Then you do not have a valid date contained in the Me.txtDate1 control.
Is this a bound or unbound control?
Larry you can see from the sample Form that the control will pass any
valid date you pass it. YOur syntax is correct to call the Calendar
control so the problem must be with the value contained within your
TextBox control or perhaps the formatting of the control. Again, just
look at the setup for the sample TextBox controls on the form you
downloaded.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:xK9yb.18298$9O5.6533@fed1read06...
This was the syntax in a form:

txtDate1 = ShowMonthCalendar(mc, Nz(Me.txtDate1, 1), , , , True)

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:dI******************@twister01.bloor.is.net.c able.rogers.com...
Are you passing a value for StartSelectedDate when you call the
ShowMonthCalendar function?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:Q74yb.16497$9O5.5451@fed1read06...
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is
there
a way to specifically tell it to start at the current date
instead?
Note: it does this fine if I'm using it in the context of a form's text box,
but I'm trying to use it on a module which is called, whereby the

date chosen is the date plugged into a variable. Everytime after I reset the database and call it up again in code, it is starting out at 1899.

Otherwise I LOVE this calendar control.

Tips?

LRH




Nov 12 '05 #4

P: n/a
Just to expand on Stephen's answer, you seem to be passing 1 as the date, so
Me.txtDate1 must contain Null. (1 as a date corresponds to 31 Dec, 1899)

If you want to default to today's date if Me.txtDate1 doesn't contain a
date, try Nz(Me.txtDate1, Date())

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:XP*****************@ursa-nb00s0.nbnet.nb.ca...
Then you do not have a valid date contained in the Me.txtDate1 control.
Is this a bound or unbound control?
Larry you can see from the sample Form that the control will pass any
valid date you pass it. YOur syntax is correct to call the Calendar
control so the problem must be with the value contained within your
TextBox control or perhaps the formatting of the control. Again, just
look at the setup for the sample TextBox controls on the form you
downloaded.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:xK9yb.18298$9O5.6533@fed1read06...
This was the syntax in a form:

txtDate1 = ShowMonthCalendar(mc, Nz(Me.txtDate1, 1), , , , True)

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in

message
news:dI******************@twister01.bloor.is.net.c able.rogers.com...
Are you passing a value for StartSelectedDate when you call the
ShowMonthCalendar function?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:Q74yb.16497$9O5.5451@fed1read06...
> I use the Lebans calendar control and love it; the only thing is that it > commonly starts out at the year 1899 rather than the current year. Is there
> a way to specifically tell it to start at the current date instead? >
> Note: it does this fine if I'm using it in the context of a form's text box,
> but I'm trying to use it on a module which is called, whereby the date > chosen is the date plugged into a variable. Everytime after I reset the > database and call it up again in code, it is starting out at 1899.
>
> Otherwise I LOVE this calendar control.
>
> Tips?
>
> LRH
>
>


Nov 12 '05 #5

P: n/a
Thanks Doug, I did not catch that at first glance. I think I will change
the sample Form to pass Date() instead of 1 as the option if Nz.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:Cy********************@news04.bloor.is.net.ca ble.rogers.com...
Just to expand on Stephen's answer, you seem to be passing 1 as the date, so Me.txtDate1 must contain Null. (1 as a date corresponds to 31 Dec, 1899)
If you want to default to today's date if Me.txtDate1 doesn't contain a date, try Nz(Me.txtDate1, Date())

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message news:XP*****************@ursa-nb00s0.nbnet.nb.ca...
Then you do not have a valid date contained in the Me.txtDate1 control. Is this a bound or unbound control?
Larry you can see from the sample Form that the control will pass any valid date you pass it. YOur syntax is correct to call the Calendar
control so the problem must be with the value contained within your
TextBox control or perhaps the formatting of the control. Again, just look at the setup for the sample TextBox controls on the form you
downloaded.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Larry R Harrison Jr" <la*******@cox.net> wrote in message
news:xK9yb.18298$9O5.6533@fed1read06...
This was the syntax in a form:

txtDate1 = ShowMonthCalendar(mc, Nz(Me.txtDate1, 1), , , , True)

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in

message
news:dI******************@twister01.bloor.is.net.c able.rogers.com... > Are you passing a value for StartSelectedDate when you call the
> ShowMonthCalendar function?
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (No private e-mails, please)
>
>
>
> "Larry R Harrison Jr" <la*******@cox.net> wrote in message
> news:Q74yb.16497$9O5.5451@fed1read06...
> > I use the Lebans calendar control and love it; the only thing is
that it
> > commonly starts out at the year 1899 rather than the current
year. Is
> there
> > a way to specifically tell it to start at the current date

instead?
> >
> > Note: it does this fine if I'm using it in the context of a
form's text
> box,
> > but I'm trying to use it on a module which is called, whereby
the date
> > chosen is the date plugged into a variable. Everytime after I

reset the
> > database and call it up again in code, it is starting out at

1899. > >
> > Otherwise I LOVE this calendar control.
> >
> > Tips?
> >
> > LRH
> >
> >
>
>



Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.