Results 1 to 2 of 2
  1. #1
    New Lounger
    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.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Crystal Beach, FL, Florida, USA
    Thanked 41 Times in 40 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.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts