Link to home
Start Free TrialLog in
Avatar of B Blyden
B Blyden

asked on

VBA - Increment database table counter when new record add from excel userform

I have an excel userform tied to access dba, that users can register for classes. They select they name and class they want. They can also go in and delete entry later if they decide not to take class. This works great. I want to make some enhancements. In table that holds the classes I added fields that holds the amount of slots available for each class and another field that holds number of slots taken. Then I based a query of that table and added expression to calculate the difference. Basically number of slots remaining.TEST_FE.xlsm

The goal is so users can see whether or not class slots are available. Once the max is reached I don't want users to be able to add or signup. But would like them to see if any slots available or not per class. So if I could get the slots taken to increase each time the user registers for the a class or reduce the number when a class is deleted.

Does anyone have any suggestion on this approach? Perhaps a sample code with something similar.


Thanks in advance.
TESTDB.accdb
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of B Blyden
B Blyden

ASKER

Thank you so much. This did the trick.
You are welcome!