Quarterly Reports

burrina

Registered User.
Local time
Today, 04:25
Joined
May 10, 2014
Messages
972
I am using a form with command buttons on it to set the criteria in my query to run the report.
Example:
cmdQ1 'Command Button
PHP:
'1st Quarterly Report.
BeginDate = DateSerial(Year(Date), Int((Month(Date) - 1) / 3) * 3 + 1, 1)
EndDate = DateSerial(Year(Date), Int((Month(Date) - 1) / 3) * 3 + 4, 0)
I managed to get this far but need to continue on with 2,3, and 4th quarters.
 
Not sure why you're quoting yourself in your first post burrina, but it's not completely clear (to me) what you're trying to do.

If you want to add quarters to a date you can use the DateAdd() function.
 
With vba on having no idea what you want.

EndDate = DateSerial(Year(Date), Int((Month(Date) - 1) / 3) * 3 + 4, 0)

This will only work if your quarters are regular quarters (1st=Jan, Feb, Mar, 2nd=Apr, May, Jun, etc.). And if that's the case, you might as well use DatePart function (http://www.techonthenet.com/access/functions/date/datepart.php)
 
I don't want to hard code it but instead allow it to calculate correctly.
The command buttons set the BeginDate and EndDate and then the query the report is based on uses it as the criteria.
 
Again, no question. No idea what kind of guidance you are looking for.

If you want to limit your query by quarter, then you should make that a field in your query. Then filtering becomes easier.


SalesQuarter: DatePart("q", [SalesDate])

Then you can filter on SalesQuarter to just the ones you want to see (you'll probably need a SalesYear field as well). You can even build a query on top of that query and Sum/Group your data by quarter.

If that doesn't provide everything you need, in your next post be sure to have a '?' somewhere.
 
I am looking to have a Single Report show the 1st Quarter,2nd Quarter,3rd Quarter,4th Quarter.

This will give me the current quarter.
PHP:
CurQtr: Format([WorkDate],"q/yyyy")
 
Oh!
He'll get bored and come back someday, maybe as burrina or someone else. ;)
 

Users who are viewing this thread

Back
Top Bottom