Date Parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Presto731
    New Member
    • Jul 2007
    • 53

    Date Parameter

    I have a paremeter query that asks for a date. Is there way to have a calendar pop up instead of the parameter dialog box?
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by Presto731
    I have a paremeter query that asks for a date. Is there way to have a calendar pop up instead of the parameter dialog box?
    Yes, see this link for a calendar that is developed using an Access form. A native access form is preferable to an activeX calendar for the reasons stated in the link. The link also has step by step instructions for setting up the calendar form in your application.

    Free popup calendar (month view) for selecting a date in a Microsoft Access database. The calendar is an Access form, so requires no additional VBA references.

    Comment

    • Presto731
      New Member
      • Jul 2007
      • 53

      #3
      Awesome, Thanks for the help!


      Originally posted by puppydogbuddy
      Yes, see this link for a calendar that is developed using an Access form. A native access form is preferable to an activeX calendar for the reasons stated in the link. The link also has step by step instructions for setting up the calendar form in your application.

      http://allenbrowne.com/ser-51.html

      Comment

      • pcturnley
        New Member
        • Aug 2007
        • 2

        #4
        I have a parameter query that asks for Start Date and End Date before running. I'd like this calendar to pop up so the user does not have to manually enter the dates.

        How do I point the query at the calendar form? I know I have to build an expression in the criteria, but I've no clue how to use the "Between..And.. " phrase to direct it to the calendar. Also, do I need to make any changes to the properties of the Calendar?

        I'm using the calendar from the link above. Any help is appreciated.

        Thanks,
        PT

        Comment

        • puppydogbuddy
          Recognized Expert Top Contributor
          • May 2007
          • 1923

          #5
          Originally posted by pcturnley
          I have a parameter query that asks for Start Date and End Date before running. I'd like this calendar to pop up so the user does not have to manually enter the dates.

          How do I point the query at the calendar form? I know I have to build an expression in the criteria, but I've no clue how to use the "Between..And.. " phrase to direct it to the calendar. Also, do I need to make any changes to the properties of the Calendar?

          I'm using the calendar from the link above. Any help is appreciated.

          Thanks,
          PT
          Complete instructions for the calendar are contained in the link. The calendar comes with several options to choose from (like first day of the week) so you will have to set the property sheet for the options you want to change.

          The calendar is opened by a command button that is tied to a particular text box (txtStartDate, txtEndDate). You would have 2 buttons, one for each textbox. So the date selected is read from/written back to the applicable textbox control on your form.

          Your query would look something like this:
          Code:
          Select * From Your Table 
          Where [your datefield] Between Forms!YourForm!txtStartDate And Forms!YourForm!txtEndDate

          Comment

          • pcturnley
            New Member
            • Aug 2007
            • 2

            #6
            Got it! Works great now.

            I didnt understand that it needed to pull from the text boxes.

            Thank you!

            Comment

            Working...