Access 2003 - Calendar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PatisStuck
    New Member
    • Jan 2008
    • 2

    #1

    Access 2003 - Calendar

    For 2003, is there a way to have a little calendar pop up when a date is required for a field? How do you create/modify?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    If you'd like to only have the calendar appear when you need to pick a date, you can use this routine.

    YourTextBoxName is the name of the box that will hold the date

    YourCalendarNam e is the name of your calendar.

    First, place the calendar where you want it to appear on the form.

    Next, select the calendar and goto Properties--Format and set Visible = No

    Then place this code in the form's code module:

    [CODE=vb]Private Sub Form_Load()
    YourCalendarNam e = Date
    End Sub

    Private Sub YourTextBoxName _DblClick(Cance l As Integer)
    YourCalendarNam e.Visible = True
    End Sub

    Private Sub YourCalendarNam e_Click()
    YourTextBoxName = YourCalendarNam e
    YourTextBoxName .SetFocus
    YourCalendarNam e.Visible = False
    End Sub
    [/CODE]
    Now, when your user DoubleClicks on the textbox where the date will go, the calendar will appear. The date is picked, and the calendar disappears!

    Welcome to TheScripts!

    Linq ;0)>

    Comment

    • PatisStuck
      New Member
      • Jan 2008
      • 2

      #3
      Gracias! This makes sense. I am still stuck on 'how' to create the calendar.

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        While there are calendars available on line, they require what I'm guessing is a little more experience in coding than you have at this point in time. The simplest way is to go into your form's Design View, on the toolbar goto Insert - ActiveX Control and scroll down to Calendar Control then click on OK. The calendar should now be on your form. Move it where you will like any other control.

        Linq ;0)>

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          Originally posted by missinglinq
          While there are calendars available on line, they require what I'm guessing is a little more experience in coding than you have at this point in time. The simplest way is to go into your form's Design View, on the toolbar goto Insert - ActiveX Control and scroll down to Calendar Control then click on OK. The calendar should now be on your form. Move it where you will like any other control.

          Linq ;0)>
          Actually Linq,

          It's probably easier to use Allen Brownes calendar as the ActiveX one creates so many problems.

          Mary :)

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            Easier for you and me, maybe, but not necessarily for everyone!

            Linq ;0)>

            Comment

            • MMcCarthy
              Recognized Expert MVP
              • Aug 2006
              • 14387

              #7
              Originally posted by missinglinq
              Easier for you and me, maybe, but not necessarily for everyone!

              Linq ;0)>
              True :D

              Comment

              Working...