Group:  Microsoft Access ยป microsoft.public.access.queries
Thread: Is it possible to have multiple queries updating from common crite

Geek News

Is it possible to have multiple queries updating from common crite
mr tom 12/30/2008 10:36:11 PM
Hi,

Our end of month reporting uses masses of queries, all of which run from
common criteria, e.g. date x to date y.

Some of these criteria, e.g. start date for reporting purposes and end date
are common to all queries and it would be a huge benefit to be able to set
them only once, rather than having to go into every single query and set them.

Using some form of today / current month etc wouldn't do as these are
sometimes run historically.

Does anybody know a way of making this happen?

Cheers,

Tom.
Re: Is it possible to have multiple queries updating from common crite
"tkelley via AccessMonster.com" <u47368[ at ]uwe> 12/30/2008 10:59:07 PM
The easy way would be to have a form open with fields to hold the dates in
question.

In the criteria:

=Forms!YourForm!txtStartDate

=Forms!YourForm!txtEndDate

Then have a button that launches the reporting process. Another benefit to
the button is that you can test for rules, like start date cannot be greater
than end date, etc.

mr tom wrote:
[Quoted Text]
>Hi,
>
>Our end of month reporting uses masses of queries, all of which run from
>common criteria, e.g. date x to date y.
>
>Some of these criteria, e.g. start date for reporting purposes and end date
>are common to all queries and it would be a huge benefit to be able to set
>them only once, rather than having to go into every single query and set them.
>
>Using some form of today / current month etc wouldn't do as these are
>sometimes run historically.
>
>Does anybody know a way of making this happen?
>
>Cheers,
>
>Tom.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200812/1

Re: Is it possible to have multiple queries updating from common c
mr tom 12/31/2008 12:08:03 AM
Thanks tkelley,

That's a good idea.

The form wouldn't always be open as the queries can be executed via Excel
(apologies for not mentioning this!)

But how about this? Could I create a table with 2 fields: start date, end
date, and simply one record? Could I then somehow make the values in this
one record the start and end dates of the queries respectively?

Does this make any sense at all?

Cheers,

Tom.

"tkelley via AccessMonster.com" wrote:

[Quoted Text]
> The easy way would be to have a form open with fields to hold the dates in
> question.
>
> In the criteria:
>
> =Forms!YourForm!txtStartDate
>
> =Forms!YourForm!txtEndDate
>
> Then have a button that launches the reporting process. Another benefit to
> the button is that you can test for rules, like start date cannot be greater
> than end date, etc.
>
> mr tom wrote:
> >Hi,
> >
> >Our end of month reporting uses masses of queries, all of which run from
> >common criteria, e.g. date x to date y.
> >
> >Some of these criteria, e.g. start date for reporting purposes and end date
> >are common to all queries and it would be a huge benefit to be able to set
> >them only once, rather than having to go into every single query and set them.
> >
> >Using some form of today / current month etc wouldn't do as these are
> >sometimes run historically.
> >
> >Does anybody know a way of making this happen?
> >
> >Cheers,
> >
> >Tom.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200812/1
>
>
Re: Is it possible to have multiple queries updating from common c
John Spencer <spencer[ at ]chpdm.umbc> 12/31/2008 3:52:29 PM
Yes, you could use a one record table and then add the table to the
query with NO joins to the table.

SELECT *
FROM SomeTable, DateTable
WHERE SomeTable.SomeDate >= DateTable.StartDate
AND SomeTable.SomeDate <= DateTable.EndDate

If you are doing this is the query grid you could enter the following
under the date field in your table

Field: SomeDate
Table: SomeTable
Criteria: Between [DateTable].[StartDate] and [DateTable].[EndDate]

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


mr tom wrote:
[Quoted Text]
> Thanks tkelley,
>
> That's a good idea.
>
> The form wouldn't always be open as the queries can be executed via Excel
> (apologies for not mentioning this!)
>
> But how about this? Could I create a table with 2 fields: start date, end
> date, and simply one record? Could I then somehow make the values in this
> one record the start and end dates of the queries respectively?
>
> Does this make any sense at all?
>
> Cheers,
>
> Tom.
>
> "tkelley via AccessMonster.com" wrote:
>
>> The easy way would be to have a form open with fields to hold the dates in
>> question.
>>
>> In the criteria:
>>
>> =Forms!YourForm!txtStartDate
>>
>> =Forms!YourForm!txtEndDate
>>
>> Then have a button that launches the reporting process. Another benefit to
>> the button is that you can test for rules, like start date cannot be greater
>> than end date, etc.
>>
>> mr tom wrote:
>>> Hi,
>>>
>>> Our end of month reporting uses masses of queries, all of which run from
>>> common criteria, e.g. date x to date y.
>>>
>>> Some of these criteria, e.g. start date for reporting purposes and end date
>>> are common to all queries and it would be a huge benefit to be able to set
>>> them only once, rather than having to go into every single query and set them.
>>>
>>> Using some form of today / current month etc wouldn't do as these are
>>> sometimes run historically.
>>>
>>> Does anybody know a way of making this happen?
>>>
>>> Cheers,
>>>
>>> Tom.
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200812/1
>>
>>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net