Results 1 to 3 of 3
  1. #1
    James Parker is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Location
    Sacramento, CA
    Posts
    11

    How Do I Get A Calendar Into A Query Parameter

    I wrote a query which prompts entry of a start date and an end date, thus the user has to type into the parameter box. The date field is called When, and the table is called Scrap_Q4. Here is the SQL language



    SELECT Scrap_Q4.REJ, Scrap_Q4.When, Count(Scrap_Q4.REJ) AS CountOfREJ
    FROM Scrap_Q4
    GROUP BY Scrap_Q4.REJ, Scrap_Q4.When
    HAVING (((Scrap_Q4.REJ) Between 108 And 132) AND ((Scrap_Q4.When) Between [start date] And [end date]))
    ORDER BY Scrap_Q4.REJ, Count(Scrap_Q4.REJ);

    I want to replace the parameter box from popping up with a calendar which will alow the user to click on a start date and an end date. This will eliminate typing and potential error.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Create a form with some calendar controls and a button.
    Use the calendar controls to get the dates.
    Use the button to execute the query with the parameters.

    I don't have access2007 but here's a free video
    http://www.myaccessprogram.com/Videos/DatePicker.html

  3. #3
    dylan_dog is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    9
    Hi,

    try this:

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

    Regards

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  2. Parameter Query?
    By luckysarea in forum Queries
    Replies: 3
    Last Post: 04-22-2011, 12:57 PM
  3. Run query from calendar control
    By DaveyJ in forum Queries
    Replies: 1
    Last Post: 07-02-2010, 07:54 AM
  4. Replies: 2
    Last Post: 03-31-2010, 05:32 AM
  5. Export Access reports/query results to Outlook Calendar/Task
    By kfinpgh in forum Import/Export Data
    Replies: 0
    Last Post: 02-22-2007, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums