Topics Search

Pull a date range into multiple queries

Pull a date range into multiple queries
Views: 172
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:

More topics

 

Multiple Append Queries

Preview
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

Preview
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

Preview
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

Preview
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

Preview
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

Preview
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.

[CODE]

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?
 

Use same date to run two queries

Preview
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 Ido 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 buttonto see the detail lines without having to enter in another date range?
 

Query with multiple date range constraints.

Preview
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.
 

Best Way Handle a Date Range

Preview
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?
 

queries with multiple tables

Preview
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.