Results 1 to 2 of 2
  1. #1
    0REDSOX7 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    6

    Question Use same date to run two queries

    Hello all,

    I need help. i have struggled with this all day and think it is time for help.

    I have currently, a form, that when opened, requires users to enter a date range. When they enter this date, it opens up a summary query that will give a summary of total number of records, sum of dollars, average number of days, etc. However, I have a button that this form page that will run ANOTHER query to show the detail, in other words, line by line data. What I do not like is how the user has to enter the date range again.



    Is there a way, I can have the date range entered for both queries only one time? this way, when the date range is entered, the user goes tot he summary form query, but can click a button to see the detail lines without having to enter in another date range?

  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,722
    You could have a form.


    You would ask for a startDate and anEndDate
    these would be on text boxes on the form.

    Your queries would have the parameters

    Select ----- where [Date to Use] Between Forms!Form1.startDate AND
    Forms!Form1.Enddate

    A long as the form is Open and the dates selected, you can run your queries.

    You could also have 2 buttons on the form, such that after entering the start and end dates, you would click a button to run one query and the other button to run the second query.

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

Similar Threads

  1. Replies: 12
    Last Post: 04-26-2012, 04:01 AM
  2. 2 Queries on one Date Field
    By LaPixie in forum Queries
    Replies: 1
    Last Post: 08-22-2011, 02:22 PM
  3. Count date entries from seperate tables/queries
    By krutoigoga in forum Queries
    Replies: 3
    Last Post: 06-30-2011, 12:48 PM
  4. Queries Criteria with date
    By dssrun in forum Queries
    Replies: 4
    Last Post: 04-21-2011, 12:50 PM
  5. Replies: 1
    Last Post: 07-07-2010, 04:22 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