Results 1 to 2 of 2
2002-01-17, 15:40 #1
- Join Date
- Jan 2002
- Thanked 0 Times in 0 Posts
Limiting entries in a Text Box (Access 2000)
We are using Access to run the office for our company. We log work completed, incomplete work to be done and we also schedule our appointments from within the program. Our problem is regarding scheduling appointments. We would like to know how to limit the number of appointments per day for each time span that we have. We run queries and reports for the schedule to print them out every day. But we have to bounce back and forth between our query to see how many appointments we have on a certain day before we can schedule the appointment. Our problem is that one day we can have 20 appointments in 4 different time slots and another day we may have 10 appointments for the time slots. Is there anyway to helps us cut down on switching through screens?
Thank you for any assistance you can offer us.
2002-01-17, 17:44 #2
- Join Date
- Jun 2001
- Crystal Beach, FL, Florida, USA
- Thanked 36 Times in 35 Posts
Re: Limiting entries in a Text Box (Access 2000)
I guess I'd use the DCount function to find the number of appointments already for that day (and time?) You could put the code in either the Form's BeforeUpdate event or the text control's BeforeUpdate event. Compare the value returned by Dcount to your limit, then pop a msgbox either warning user or just cancel the update.