Question

I am using Access to create a database for my business. The invoice I want to create uses a Work Order # to join a services table and parts table to the master work order table. They are setup as follows:

Work Orders: [Work Order ID], [ClientID], [EmployeeID], [Issue], [DateReceived], [Date Required], [Date Finished], [Date Picked Up], [Sales Tax]

Work Order Parts: [Work Order Part ID], [Work Order ID], [Part ID], [Quantity], [Part Total]

Work Order Services: [Work Order Service ID], [Work Order ID], [Service ID], [Rate], [Service Total]


I also have a Service Table and a Parts Table setup as follows:

Services: [Service ID], [Service Name], [Service Description], [Unit Price]

Parts: [Part ID], [Part Name], [Part Description], [Unit Price]


My goal is to use Work Order as the Main Report, and have Work Order Parts and Services each as a SubReport that would list the Services and Parts based on the Work Order # on the main Report. However I am not sure how to make them interact.


I am working on the Services SubReport and can't seem to get the fields to populate the correct record source or know how to pull the correct information from the Report Source.

Here is my Services SubReport in Design View:

enter image description here

Here is my Source for the Services SubReport:

enter image description here

My Service Totals uses the Rate from Work Order Services and the Unit Price from Services to calculate the Total: I set it up like this but it doesn't work

Service Total: Sum([Rate]*DLookUp("[Unit Price]","Services","[ServiceID] = Forms![Services]![ServiceID]"))

I would appreciate any help to get this working, I am not looking for a hand out just a little basic guidance as to how to proceed and do this correctly. Thanks

Was it helpful?

Solution

You need to set up a Parent/Child relationship with your reports. Look at the properties on your SubReport and you should see where you can set the Master (Parent) and Child fields. I believe in your case you're going to want to use Work Order ID as the field to join on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top