I am trying to put together a query to track customer receivables. The relevant data is in two tables: tblData and tblCash. tblData has customer info, tblCash has payment records. Each of the tables is organized by a customer number. I need a simple query to tell me the following:
The sum of deposits, organized by customer number, and I want to input the cutoff deposit date. However, I want the results to include policies where no payment has been made. For example, if Customer XYZ placed an order on 3/1 for $50, and payment is due by 3/31, and a payment is either not made, or not made by the input date, I want the query to show a deposit of $0, rather than leaving the customer off of the results. In many cases, tblData may have the order info, but because no payment has been made, tblCash will have nothing for that customer number.