Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

tickler for quarterly reports

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
spence - 12 Jul 2006 01:48 GMT
I'm using Access to manage 700 annual budgets, each tied to a client, in a
simple table:

[BudgetID] (key field)
[BudgetStartDate]
[BudgetEndDate]
[ClientID] (tied to my client table's key field)

The budgets always run 365 days and they always start on the first of the
month. However, their start dates are scattered throughout the year rather
than aligning with a calendar or fiscal year.

I am responsible for generating quarterly financial reports for each budget
(reports which are done outside of Access) and so I need to create a query
that I can run on the first of every month that will give me a list of all
budgets where a quarter has just ended, e.g. on 08/01/06 I want to be able to
pull a list of all budgets that started 05/01/06 (Q1), 02/01/06 (Q2),
11/01/05 (Q3), and 08/01/05 (Q4). (Budget end dates would work as well as
start dates for my purposes.)

I have been managing this - with my limited knowledge - using a query that
requires four date parameters to be entered based on a cheat sheet that I
created. I would very much like to eliminate the inherent margin of error in
that scenario by reducing it to a single parameter -or no parameters based on
the day the query is run. *Ideally* the query would return not only the list
of budgets where quarterly reports are due, but also which quarter (1st, 2nd,
3rd, or 4th) for which a report is due.

I thought this would be easier than it is, a situation that has been
exacerbated by my particular difficulty with time relationships. Thanks very
much in advance for any guidance.

spence
Allen Browne - 12 Jul 2006 03:55 GMT
Create a table with just one field named CountID, type Number, size Long,
marked as primary key. Save as tblCount. Enter the values 0 to 3, i.e. 4
records.

Create a query that uses both your main table and tblCount, with no join
(i.e. no line joining the 2 tables in the upper pane of query design), known
as a Cartesian Product (i.e. every possible combination of the two.)

In a fresh column of the Field row, enter:
   QtrStart: DateAdd("q", [CountID],[BudgetStartDate])

You now have a record for each quarter for each budget. Add whatever
criteria you want under this field.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> I'm using Access to manage 700 annual budgets, each tied to a client, in a
> simple table:
[quoted text clipped - 36 lines]
>
> spence
spence - 12 Jul 2006 19:30 GMT
Thanks, Allen. That got me most of the way there. Can you help me with the
syntax to get quarter end dates in addition (or instead of) quarter start
dates?

Also, wondering how to write an expression that can turn the values in
[CountID] into "Quarter1", "Quarter2), etc.

Regards,
spence

> Create a table with just one field named CountID, type Number, size Long,
> marked as primary key. Save as tblCount. Enter the values 0 to 3, i.e. 4
[quoted text clipped - 50 lines]
> >
> > spence
Allen Browne - 12 Jul 2006 23:09 GMT
Quarter end date is:
   DateAdd("q", 1, [QuarterStartDate]) - 1

The expression would be:
   "Quarter" & Format([QuarterStartDate], "q")

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Thanks, Allen. That got me most of the way there. Can you help me with the
> syntax to get quarter end dates in addition (or instead of) quarter start
[quoted text clipped - 71 lines]
>> > very
>> > much in advance for any guidance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.