Updating my NUMBER OF PLACES LEFT field

peterb

Registered User.
Local time
Today, 10:30
Joined
May 4, 2001
Messages
12
Thanks to all who have helped me enormously so far, here's another little problemo...

I have a COURSE table with an attribute of NUMBER OF PLACES for various courses on it. I would like this number to be decreased by one each time a booking is made (through a BOOKING form) for a particular course.

I think a query might be in order, but am not sure and would love any ideas . . ?
 
Not a good idea!
Your booking records as they are should be able to provide you with this information using Count, DCount or a Totals Query.
 
Don't quite get it? - what is count, Dcount?
 
KevinM is right...the idea is that you never store a field in a table that is really a calculation. This is a basic tenet of database design.

In this case, you have a field somewhere that says how many places there were to start with, right? Then you create a query that will sum up the places used so far, and subtract that from the original "how many places", so you'll know how many are left.

This sounds like it is not very efficient, but it is not as bad as all that, and it is the only way to truly be certain that you are accurate.

You can look up Count, Dcount, and totals in the Access Help.
 
Thanks for the good advice.
Have already managed how to get a count of people on courses - it's how to subtract that value from original "how many places".
No can do - yet!
 

Users who are viewing this thread

Back
Top Bottom