what does this code do?

  • Thread starter Thread starter steve c
  • Start date Start date
S

steve c

I had a guy help me out on a form with calculating a
total that was SEAT_CAPACITY - SEATS_OCCUPIED, giving me
SEATS_AVAILABLE. But I can't get it to work on my form.
It works on his. WHat could i be missing?

=[fliSeatCapacity]-[sfrmPassengers].[Form].[txtCount]


I'm assuming that last part is subtracting a count of the
passengers from the passenger subform from the capacity
of the plane.
 
Lets assume that you have a text box named txtSeats on the main form and the
code you posted is the control source for that textbox.
You then need another textbox named fliSeatCapacity that contains the value
total seats. On your subform, named sfrmPassengers, you have a textbox named
txtCount (probably in the form footer) that has the total passenger count.
So the code subtracts the total passengers from the total capacity and
presents you with the amount available. What isn't answered here is where
the values Capacity and txtCount come from, but I'll leave that for you to
determine....

Damon
 
Back
Top