February 18th, 2013, 12:55 AM
how to auto calculate in forms help
i have a tblTicket with a set of data about the amount of sold tickets with 2 seat options
2 data field
Combobox Stand, Cabin
in Tickets Form,
when i select ticket type Stand.
how do i make it auto calculate in the form to show the amount of sold tickets for 'Stand'.
and if i add new records it should calculate and add in the total amount in it.
any example for this kind of code??
sorry for my english
February 18th, 2013, 06:43 AM
I'm going to assume you want the total number of stand tickets sold to date for a particular event or for a particular date. One method is to create an aggregate query to sum up all of the number of tickets sold. Add a subform to your main form using the query as the record source. (You can format it so that it doesn't even appear to be a subform.) Then in the after update event on your combo box or sold_tickets box just use the code: me.subformname.requery