• Pick a date (Access 97)

    Author
    Topic
    #357828

    On a form created in Access97, I have included the ActiveX control that allows you to pick a date from a calendar. Would appreciate any assistance on the following: I want to be able to click on a button and have the result obtained with the ActiveX control inserted into a date field in the same form. Thanks in advance!

    Viewing 0 reply threads
    Author
    Replies
    • #532410

      First, name the calendar control to something that looks good. (You don’t want the neighbors talking.) How about CalControl?

      CalControl has a property named Value that is changed everytime that darned left
      mouse button is clicked over one of those day buttons on the calendar. You
      reference that value by using this complicated formula:

      CalControl.Value

      Now, just assign that value to your date variable (let’s say you named it MyDate):

      MyDate = CalControl.Value

      Experiment by putting this code on the form under Build Event:

      Private Sub CalControl_Click()
      • #532420

        Thank, Kevin! The complicated code you provided worked like a charm!

      • #537906

        Hi Kevin…

        I found this thread and it has been helpful to me since I’ve never used the calendar control before this. Now, you know I’m a novice and this may be a really dumb question but I have to ask it. When I created the user form with the calendar control, the control properties for the date are set to 8/17/2001. Will this change to reflect the current date when used by the end users? If not, how do I have it increment day by day?

        Thanks Kev.

    Viewing 0 reply threads
    Reply To: Pick a date (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: