I have a small clinic database with two tables, tblAppointments and tblPayments, which I would like to use for the query, qryBalance.
So one tblAppointments record can contain several tblPayments records, as patients can make several small payments for one visit. I set up the query to show the amount charged from tblAppointments and the sum of payments made for that particular appointment from tblPayments, and finally, the difference in a new column. So the query contains the following fields:
ApptID ApptDate AmountCharged SumofPaymtMade RemainingBalance
It works, but only when there is at least one tblPayments record existing for any given appointment. If there is no payment record, the appointment record doesn't even show, when I want it to return the amount charged as the balance.
I'm currently working around it by adding a payment record with 0 payment for all appointments without a payment, but I couldn't help but think there must be a better design.
Can I make Access recognize non-record as zero?
Thanks.