I need an SQL query designed for my MS Access database. Actually there will be two (2) different queries, but they are very closely related. It's a little beyond what I can do with the Access wizard, so I need some help. This database is part of a medical billing module. I will use the queries to print reports on outstanding balances. Basically, I have two tables of interest. One contains line items with the amount of charges (split into two categories/columns: patient charges and insurance charges). The other table contains transactions (plus/minus amounts in a single column applied against the line item charges). What needs to be done: I need a query which will select all charges in the line-item table for a given "fee slip#", total them (without regard to whether they are insurance or patient charges) and compare this amount to the sum of all transactions with the matching feeslip#. If they do not match, they will be select by the query. One query will return all patients with a negative balance (i.e. they have overpaid); the other will return all patients with a positive balance (they owe). Table/Field Structure: tbl_Acct_FeeSlipLines type FeeSlipID Long Integer PatTotal currency InsTotal currency tbl_Acct_FeeSlipTransact FeeSlipID Long Integer trans_amt currency Queries (to be created): qPatientsWithPosBal FeeSlipID Balance qPatientsWithNegBal FeeSlipID Balance
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
MS Access 2000