Results 1 to 2 of 2
2008-05-11, 11:18 #1
- Join Date
- Feb 2002
- Thanked 0 Times in 0 Posts
Report for quarters (Access 2000)
I have a coloumn in my query defining the quarter of the invoices as follows:
This column shows the quarter when the invoice is issued.
On that basis i want to build a report depending on the four options on the form, corresponding to the four quatters of the year.For example when i press the first option called First quarter, i want to open the report only for the first quarter of the year.Can i do it with one and the same report ?
2008-05-11, 12:32 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Report for quarters (Access 2000)
You can create a report based on the query, let's say rptInvoices.
I assume that you have an option group on your form, let's say grpQuarter.
Make sure that the Option Value property for the option buttons corresponds to the quarters, i.e. values 1 through 4.
Place a command button cmdReport next to the option group with the following On Click event procedure:
Private Sub cmdReport_Click()
On Error GoTo ErrHandler
DoCmd.OpenReport ReportName:="rptInvoices", View:=acViewPreview, _
WhereCondition:="InvoiceQuarter=" & Chr(34) & Me.grpQuarter & Chr(34)
If Err = 2501 Then
' Report was canceled, we can ignore that
MsgBox Err.Description, vbExclamation
See Report for quarters on Utter Access for another approach.