Topics Search

Pull a date range into multiple queries

Pull a date range into multiple queries
Views: 195
Kind of a novice question here. I have a large number of queries which are run weekly using a date range, and currently edit each query each week to enter the new date range.

Is there a better way, to enter the new date range somewhere and have all the queries pull the date range from that one location
Sponsored Links:

Similar posts...


Multiple Append Queries

Multiple Append Queries Icon
I have multiple append queries that calculate certain data that I use for reporting purposes. I have the queries tied into a macro located on a Switchboard. When I select my date range to run those queries I am prompted for a Start and End Date for each query. How can I get around this? I just want to type in yesterdays date once and it run the queries for that date range

Open multiple queries, change date range, run and close

Open multiple queries, change date range, run and close Icon
Using Access 2010, I have a number of queries used in sub-reports for my master report. At the beginning of the month, I need to open each query, change the date (it will be the same date range for all of the queries) criteria(s), run the query, close it and then move on to the next query and do the same thing.

Since I have over a 100 queries to accomplish the massive reporting involved, I really don't want to do this individually.

About have the queries use a "between" date range and the other half are grouped by month so they use a "month year" range. Most of the queries have multiplecriteria so the date criteria might be used up to 10 times in one query.

Multiple date ranges on report

Multiple date ranges on report Icon
I am trying to generate a report that requires the user to enter a date range once, and that date will then be used to generate several sub-reports based on queries. For example I have 7 tables that have a field named: [DateIn].

I want to use a query to calculate how many records have been created within the date range entered for each table and then summarize this on a report. I only want the user to enter the date range once.

Creating a printed report containing multiple counts

Creating a printed report containing multiple counts Icon
I have a statistical report that needs creating when demanded by the user. The user enters a date range on the form in 2 text boxes and the values are passed into queries(?). The stats report should then contain a load of count statistics for how many records have been received/rejected/exported etc. in that date range. The counts also have different conditions - imported records for instance need to fit the date range entered by the user, but for the exported records section of the report, records' export date needs to fit the date range specified.

Using dCount on the report itself has proved useless. I have copied syntax from other posts talking about dCount and copied code from Microsoft's own website and Access doesn't like it. So, is there any way of getting these counts without running about 40 queries and a load of queries based upon the queries to get the counts?

Date Range in Macro

Date Range in Macro Icon
Access 2000?
I have three different reports which all work off a user specified date range. I have created a macro to run them and as long as I specify "Between And" conditions in the queries behind them the macro works fine, but you have to enter the date range three different times.

Is there a way to specify the date range once in the macro so that all the reports run for that date range

Query for Received and Closed Date Range

Query for Received and Closed Date Range Icon
I built a report request menu to dynamically build a SQL query for Access to run a report. The user selects the parameters and the form builds the query on the fly and then changes therecord set for the report to pull the right data.

The query building was coming along swimmingly until the users requested a date range. I have a date range selection that can look at any cases within the date range. This part is not working currently.

This is what the form generates. Get all cases with these specific parameters within this date range.


The problem ends up being that I get cases with received dates within the range and closed dates outside of the range or vice versa.

2) Any thoughts on how to fix this?

Best Way Handle a Date Range

Best Way Handle a Date Range Icon
I have a very basic MasterTbl that is imported from Excel. Each line item is a task that was not completed on-time. The fields are: Employee, Customer, Date (This is a daily Long date with time that I have formatted to Short Date).

I need to count this data different ways and have created several Crosstab Queries:
1) Number of shifts worked by Employee
2) Number of customers helped by employee and shift
3) Total number of customers helped
4) Total of overdues with breakdown by date (count of Date)

These all work great and give me exactly what I need. However, I need to be able to enter a date range and have the totals from each of the above queries reflect that date range so that I have one report that shows the employee, how many shifts were worked for the time period, how many customers were helped, and how many tasks were not completed on time (this comes from thedate field).

Do I have to create separate queries, entering the date range for each, or is there an easier way?

Combining columns from multiple tables/queries into one?

Combining columns from multiple tables/queries into one? Icon
Is there a way to pull the results from several queries/tables into one table/query and only compare it to one variable?

For example, I have an Excel spreadsheet that is set up with every PO number available. The other fields in the spreadsheet may contain data or they may be blank.

PO | Date Created | Date Received

Is there any way to pull all the data from "Date Created" but only have it compare the table's relationship with the PO number and not also the "Date Received" column

queries with multiple tables

queries with multiple tables Icon
I have multiple tables, say 3 tables
I want to combine all the data from the 3 tables and get the sum of all the prices with a given condition that the query date should be within the range of date from and to of all tables. Worst scenario, all date from and to are not equal.

Query with multiple date range constraints.

Query with multiple date range constraints. Icon
I have tables that I have pasted sample data for below. tblVisit has the Date range where we have to visit a Property.

tblBlackout has a Date Range where we can not visit the property. I would like to enter a Start Date and End Date in a form, lets say Forms![FormName]![SDate] and Forms![FormName]![EDate] and have it show all properties that can be visited in that range.