Solved

access date query criteria

Posted on 2011-02-28
4
414 Views
Last Modified: 2012-05-11
Mental block over query criteria:

I have a sales date field [date of sale] and I want separate criteria for two separate queries.

The first query is " which clients have placed a sale in the last 30 days" by reference to clients records

The other is message box "those clients which sales since have taken place since [insert date]"

Each client has its own record. the two queries are stand alone.

Just need the criteria for the date field query.

0
Comment
Question by:topUKlawyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 35004645
The first query needs to be a groupby/totals query.  Just needs Customer name  and Date of sale fields.
Group By customer name and get Max of date of sale.
Set the criteria on the Date of sale column to
>Date()-31

Secod query is the same as the first except the criteria is :
>[Enter date]
You should declare [Enter Date] in the query parameters as a datetime datatype to prevent invalid dates being entered.
0
 

Author Comment

by:topUKlawyer
ID: 35004792
Thanks.

Not sure where this is declared/entered:

You should declare [Enter Date] in the query parameters as a datetime datatype to prevent invalid dates being entered.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 35004986
In query design view choose Query>Parameters from the menu.
0
 

Author Comment

by:topUKlawyer
ID: 35010853
many thanks. esp the parameters point which i had not come across before.

0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question