Great Day, I have a form that is used for a repair order at a automobile repair shop. The customer comes in a lays out what is wrong with the car – brakes squeal, gas smell, oil change, etc. When the service writer enters the repair needs into the form (frmJobOrder), there are three categories that the service writer can associate each repair item to: 1. Item part of original estimate; 2. Item part of Repair Order; and 3. Item recommended by technician (Line item 3 results while the technician is doing the repair and then finds additional things that need repair. ( I have included a screen shot of this section of the form).
After the Repair Order screen has been completed, the service writer can print an invoice by clicking “Print Invoice.” The code behind the print invoice button is enclosed. What I am trying to do is only print items that are part of the repair order, which may or may not be part of the original estimate. I will also eventually want to create a routines that only prints items that are part of the original estimate and one that only prints items that the technician recommended, but I am only asking for assistance on this one piece of the puzzle, and I suspect that perhaps I can figure the other two out.
When I click "Print RepairOrder" all of the items are still printing. It may help to know that the items to be printed in the report are in a subreport. So to be clear, I only want the subreport to display repair items that are part of the repair order.
Thanks in advance for your assistance.
Private Sub btnOpenReport_Click()
On Error GoTo Err_btnOpenReport_Click
Dim stDocName As String
Dim stFilter As String
Dim stDateRange As String
stDocName = "rptInvoice2"
‘ stLinkCriteria = "[JobID]=" & Me.JobID
stLinkCriteria = "[JobID]=" & Me.JobID & " AND [Forms]![frmJob]![frmScopeofJobSub].[Form]![RepairOrder]= '-1'" ' I am playing with some schemes to see how to print seperately estimate and invoice
DoCmd.OpenReport ReportName:="rptInvoice2", _