Aug 11 2009, 11:15 AM
I created a form to handle partial shipments for a custom db for a machince shop. The the form is based on a query that pulls job info from 2 tables. The form also has a subform that consist of a table I created to handle partial shipments. The partial shipments table has a partial ship qty, date and a balance. I would like the bal to calculate when a user enters a new qty and clicks a save button. I can do the first calculation as I use the [order_qty]- [part_ship_qty] for bal. How do I check for a previous bal and use it to calculate new balance? Thanks
Aug 11 2009, 05:05 PM
Welcome to UA!
You have to get the previous balance by using DSum on the (Field in question from the table in question Where all entries are LESS than the first entry on the Form). Then Add this value to the Sum textbox on your form. You will have to wrap the DSUM in the NZ Function, supplying 0 if the DSum returns Null...ie if there are no entries before the first date on the form.