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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Larry R Harrison Jr

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

    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


  • Douglas J. Steele

    #2
    Re: Lebans Calendar Control:Start At Current Date Not "1899&quot ;

    Are you passing a value for StartSelectedDa te when you call the
    ShowMonthCalend ar function?


    --
    Doug Steele, Microsoft Access MVP

    (No private e-mails, please)



    "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
    news:Q74yb.1649 7$9O5.5451@fed1 read06...[color=blue]
    > 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[/color]
    there[color=blue]
    > 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[/color]
    box,[color=blue]
    > 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
    >
    >[/color]


    Comment

    • Larry R Harrison Jr

      #3
      Re: Lebans Calendar Control:Start At Current Date Not &quot;1899&quot ;

      This was the syntax in a form:

      txtDate1 = ShowMonthCalend ar(mc, Nz(Me.txtDate1, 1), , , , True)



      "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in message
      news:dI7yb.9359 6$Fv8.6107@twis ter01.bloor.is. net.cable.roger s.com...[color=blue]
      > Are you passing a value for StartSelectedDa te when you call the
      > ShowMonthCalend ar function?
      >
      >
      > --
      > Doug Steele, Microsoft Access MVP
      > http://I.Am/DougSteele
      > (No private e-mails, please)
      >
      >
      >
      > "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
      > news:Q74yb.1649 7$9O5.5451@fed1 read06...[color=green]
      > > 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[/color]
      > there[color=green]
      > > 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[/color]
      > box,[color=green]
      > > 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
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Stephen Lebans

        #4
        Re: Lebans Calendar Control:Start At Current Date Not &quot;1899&quot ;

        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

        Access Code, Tips and Tricks
        Please respond only to the newsgroups so everyone can benefit.


        "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
        news:xK9yb.1829 8$9O5.6533@fed1 read06...[color=blue]
        > This was the syntax in a form:
        >
        > txtDate1 = ShowMonthCalend ar(mc, Nz(Me.txtDate1, 1), , , , True)
        >
        >
        >
        > "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in[/color]
        message[color=blue]
        > news:dI7yb.9359 6$Fv8.6107@twis ter01.bloor.is. net.cable.roger s.com...[color=green]
        > > Are you passing a value for StartSelectedDa te when you call the
        > > ShowMonthCalend ar function?
        > >
        > >
        > > --
        > > Doug Steele, Microsoft Access MVP
        > > http://I.Am/DougSteele
        > > (No private e-mails, please)
        > >
        > >
        > >
        > > "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
        > > news:Q74yb.1649 7$9O5.5451@fed1 read06...[color=darkred]
        > > > I use the Lebans calendar control and love it; the only thing is[/color][/color][/color]
        that it[color=blue][color=green][color=darkred]
        > > > commonly starts out at the year 1899 rather than the current year.[/color][/color][/color]
        Is[color=blue][color=green]
        > > there[color=darkred]
        > > > a way to specifically tell it to start at the current date[/color][/color][/color]
        instead?[color=blue][color=green][color=darkred]
        > > >
        > > > Note: it does this fine if I'm using it in the context of a form's[/color][/color][/color]
        text[color=blue][color=green]
        > > box,[color=darkred]
        > > > but I'm trying to use it on a module which is called, whereby the[/color][/color][/color]
        date[color=blue][color=green][color=darkred]
        > > > chosen is the date plugged into a variable. Everytime after I[/color][/color][/color]
        reset the[color=blue][color=green][color=darkred]
        > > > database and call it up again in code, it is starting out at 1899.
        > > >
        > > > Otherwise I LOVE this calendar control.
        > > >
        > > > Tips?
        > > >
        > > > LRH
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]

        Comment

        • Douglas J. Steele

          #5
          Re: Lebans Calendar Control:Start At Current Date Not &quot;1899&quot ;

          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

          (No private e-mails, please)



          "Stephen Lebans" <ForEmailGotoMy .WebSite.-WWWdotlebansdot com@linvalid.co m>
          wrote in message news:XPbyb.687$ IF6.48173@ursa-nb00s0.nbnet.nb .ca...[color=blue]
          > 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" <larrytuaz@cox. net> wrote in message
          > news:xK9yb.1829 8$9O5.6533@fed1 read06...[color=green]
          > > This was the syntax in a form:
          > >
          > > txtDate1 = ShowMonthCalend ar(mc, Nz(Me.txtDate1, 1), , , , True)
          > >
          > >
          > >
          > > "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in[/color]
          > message[color=green]
          > > news:dI7yb.9359 6$Fv8.6107@twis ter01.bloor.is. net.cable.roger s.com...[color=darkred]
          > > > Are you passing a value for StartSelectedDa te when you call the
          > > > ShowMonthCalend ar function?
          > > >
          > > >
          > > > --
          > > > Doug Steele, Microsoft Access MVP
          > > > http://I.Am/DougSteele
          > > > (No private e-mails, please)
          > > >
          > > >
          > > >
          > > > "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
          > > > news:Q74yb.1649 7$9O5.5451@fed1 read06...
          > > > > I use the Lebans calendar control and love it; the only thing is[/color][/color]
          > that it[color=green][color=darkred]
          > > > > commonly starts out at the year 1899 rather than the current year.[/color][/color]
          > Is[color=green][color=darkred]
          > > > there
          > > > > a way to specifically tell it to start at the current date[/color][/color]
          > instead?[color=green][color=darkred]
          > > > >
          > > > > Note: it does this fine if I'm using it in the context of a form's[/color][/color]
          > text[color=green][color=darkred]
          > > > box,
          > > > > but I'm trying to use it on a module which is called, whereby the[/color][/color]
          > date[color=green][color=darkred]
          > > > > chosen is the date plugged into a variable. Everytime after I[/color][/color]
          > reset the[color=green][color=darkred]
          > > > > database and call it up again in code, it is starting out at 1899.
          > > > >
          > > > > Otherwise I LOVE this calendar control.
          > > > >
          > > > > Tips?
          > > > >
          > > > > LRH
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >[/color]


          Comment

          • Stephen Lebans

            #6
            Re: Lebans Calendar Control:Start At Current Date Not &quot;1899&quot ;

            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

            Access Code, Tips and Tricks
            Please respond only to the newsgroups so everyone can benefit.


            "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in message
            news:Cycyb.9214 4$X2W1.19757@ne ws04.bloor.is.n et.cable.rogers .com...[color=blue]
            > Just to expand on Stephen's answer, you seem to be passing 1 as the[/color]
            date, so[color=blue]
            > Me.txtDate1 must contain Null. (1 as a date corresponds to 31 Dec,[/color]
            1899)[color=blue]
            >
            > If you want to default to today's date if Me.txtDate1 doesn't contain[/color]
            a[color=blue]
            > date, try Nz(Me.txtDate1, Date())
            >
            > --
            > Doug Steele, Microsoft Access MVP
            > http://I.Am/DougSteele
            > (No private e-mails, please)
            >
            >
            >
            > "Stephen Lebans"[/color]
            <ForEmailGotoMy .WebSite.-WWWdotlebansdot com@linvalid.co m>[color=blue]
            > wrote in message news:XPbyb.687$ IF6.48173@ursa-nb00s0.nbnet.nb .ca...[color=green]
            > > Then you do not have a valid date contained in the Me.txtDate1[/color][/color]
            control.[color=blue][color=green]
            > > Is this a bound or unbound control?
            > > Larry you can see from the sample Form that the control will pass[/color][/color]
            any[color=blue][color=green]
            > > 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,[/color][/color]
            just[color=blue][color=green]
            > > 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" <larrytuaz@cox. net> wrote in message
            > > news:xK9yb.1829 8$9O5.6533@fed1 read06...[color=darkred]
            > > > This was the syntax in a form:
            > > >
            > > > txtDate1 = ShowMonthCalend ar(mc, Nz(Me.txtDate1, 1), , , , True)
            > > >
            > > >
            > > >
            > > > "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in[/color]
            > > message[color=darkred]
            > > >[/color][/color][/color]
            news:dI7yb.9359 6$Fv8.6107@twis ter01.bloor.is. net.cable.roger s.com...[color=blue][color=green][color=darkred]
            > > > > Are you passing a value for StartSelectedDa te when you call the
            > > > > ShowMonthCalend ar function?
            > > > >
            > > > >
            > > > > --
            > > > > Doug Steele, Microsoft Access MVP
            > > > > http://I.Am/DougSteele
            > > > > (No private e-mails, please)
            > > > >
            > > > >
            > > > >
            > > > > "Larry R Harrison Jr" <larrytuaz@cox. net> wrote in message
            > > > > news:Q74yb.1649 7$9O5.5451@fed1 read06...
            > > > > > I use the Lebans calendar control and love it; the only thing[/color][/color][/color]
            is[color=blue][color=green]
            > > that it[color=darkred]
            > > > > > commonly starts out at the year 1899 rather than the current[/color][/color][/color]
            year.[color=blue][color=green]
            > > Is[color=darkred]
            > > > > there
            > > > > > a way to specifically tell it to start at the current date[/color]
            > > instead?[color=darkred]
            > > > > >
            > > > > > Note: it does this fine if I'm using it in the context of a[/color][/color][/color]
            form's[color=blue][color=green]
            > > text[color=darkred]
            > > > > box,
            > > > > > but I'm trying to use it on a module which is called, whereby[/color][/color][/color]
            the[color=blue][color=green]
            > > date[color=darkred]
            > > > > > chosen is the date plugged into a variable. Everytime after I[/color]
            > > reset the[color=darkred]
            > > > > > database and call it up again in code, it is starting out at[/color][/color][/color]
            1899.[color=blue][color=green][color=darkred]
            > > > > >
            > > > > > Otherwise I LOVE this calendar control.
            > > > > >
            > > > > > Tips?
            > > > > >
            > > > > > LRH
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >[/color]
            >
            >[/color]

            Comment

            Working...