Hi guys
Newbie here.
I am using Access 2007 and have a database that has a table called "WorkOrders" that are basically an Invoice type of thing that contains some information such as when it was created, the ID of the Customer etc.
I also have a table called "payments" that contains a record of every payment that is created.
Here is the problem....
I have created a split form for the Workorders table and have it all working really nicely as it allows the user to see all of the 274 Workorders that are in the table and to double click to view the details of the actual Workorder..
I have added a text box to the form called "Total Payments". I have also added a query called "sum total payments" to the actual form query so that I can link the "Total Payment" text box to it......so far so good.
The problem is that it is only showing 116 Workorders in the lower half of the split form. I figured out that there 116 are the only Workorders that have actual payments against them. The other 158 Workorder don't have any payments so therefore there are not records (even $0.00) in the Payments table.
So, in summary, I want the total 274 Workorders to be displayed in the lower half of the split form regardless if they have payments or not....
I have spent a lot of time mucking around to try to figure this out but I give up and hopefully one of you guy can provide me with a simple solution.
Here is the SQL code for the query:
SELECT DISTINCTROW Payments.WorkorderID, Sum(Payments.PaymentAmount) AS [Total Payments]
FROM Payments
GROUP BY Payments.WorkorderID;
Thanks for your help.
Regards
Greg
Newbie here.
I am using Access 2007 and have a database that has a table called "WorkOrders" that are basically an Invoice type of thing that contains some information such as when it was created, the ID of the Customer etc.
I also have a table called "payments" that contains a record of every payment that is created.
Here is the problem....
I have created a split form for the Workorders table and have it all working really nicely as it allows the user to see all of the 274 Workorders that are in the table and to double click to view the details of the actual Workorder..
I have added a text box to the form called "Total Payments". I have also added a query called "sum total payments" to the actual form query so that I can link the "Total Payment" text box to it......so far so good.
The problem is that it is only showing 116 Workorders in the lower half of the split form. I figured out that there 116 are the only Workorders that have actual payments against them. The other 158 Workorder don't have any payments so therefore there are not records (even $0.00) in the Payments table.
So, in summary, I want the total 274 Workorders to be displayed in the lower half of the split form regardless if they have payments or not....
I have spent a lot of time mucking around to try to figure this out but I give up and hopefully one of you guy can provide me with a simple solution.
Here is the SQL code for the query:
SELECT DISTINCTROW Payments.WorkorderID, Sum(Payments.PaymentAmount) AS [Total Payments]
FROM Payments
GROUP BY Payments.WorkorderID;
Thanks for your help.
Regards
Greg