Microsoft Access Databases

  Poloman69 08:47 13 Aug 03

How can i make an access database retrieve data between two dates, such as a monthly report. I have built a database to show the number of sales made each month, and want access to be able to retrieve data to show weekly and monthly sales?

I can select it to search indivdual dates, or before or after a specific date, but how can i set it so that it can find it monthly or weekly.


  harristweed 09:44 13 Aug 03

Build a query that has the date field in it. Then you can specify two dates to query BETWEEN.

All on the same line in the query in this format Between #3/8/03# And #10/8/03#

  xania 09:45 13 Aug 03

You need to run a query with the criteria

Between #13/08/2003# and #13/09/2003#

but make sure that your format reflects that used in your database.

NB #13/08/2003# will select only those records with today's date.

  Poloman69 14:01 13 Aug 03

Thankyou for that, i have entered the details as you stated, but how can i modify this to find data between two "user selected" dates. Say for example i wish to search all data between 2 random dates (so not specified between two exact dates) so that i can produce weekly and monthly reports.

I need to be able to just enter 2 dates and for it to find the results for the two dates i have selected, and not just 2 specific dates as i put in the query.

(ie so that i can do multiple searches or any dates or months).

Any help would be great

  Poloman69 14:06 13 Aug 03

I will condense my question:

I want to be able (using a form) to search for results for sales figures, so that all i need to do, is hit a button, and it will come up:

"Please Select First Date". then
"Please Select Secod Date"

And it will find all results within the 2 dates i have selected. Therefore i am not restrained with the search i can carry out. So instead of entering into the query

"Between #13/08/2003# and #13/09/2003#"

I can instead select ANY dates at preference.

Please Can Anyone Help, i have been trying to do this for hours now, even using Help BOoks i cannot find what criteria i need to enter to allow this type of search.

  JoJoh 19:36 13 Aug 03

Make a query and in the criteria field enter as

Between[Enter first date] and [Enter second date]

This will give you data between 2 dates

  xania 19:37 13 Aug 03

OK - I see what you mean, and I THINK I have an answer for you to try. If you type in something like

"Between START and END",

then, when you try to run the query, you should be prompted to put values to the variables <START> and <END>. Try it and report back.

  newnickname 19:38 13 Aug 03

Try the statement below:-

"Between [Please Select First Date] and [Please Select Second Date]"

When creating the form select the query as the source for the form. When you open the form it should ask for the dates.

  Poloman69 22:25 13 Aug 03

newnickname & jojoh

I tried your method, but it will only find results for the two dates selected, and not all results in between the two dates

  Poloman69 22:33 13 Aug 03

Ah i have tried it again, i found where my error was. on my table, the date input was in as text, and not the date/time function. When i changed this to show short date, it worked

THANKYOU !!!!!!!!!!!!!!!!!!!!!

This thread is now locked and can not be replied to.

Nintendo Switch (Nintendo NX) release date, price, specs and preview trailer: Codename NX console…

1995-2015: How technology has changed the world in 20 years

8 things designers (and brands) need to know about the modern woman

How to speed up a slow Mac: 19 great tips to make an iMac, MacBook or Mac mini run faster | Speed…