Results 1 to 7 of 7

Thread: Limiting Fields

  1. #1
    Join Date
    Oct 2007
    Posts
    17

    Unanswered: Limiting Fields

    I have a MS Access DB that monitors trailers in certain zones. There are only 50 spots in a zone. Now when someone is entering a trailer into a zone potentially they could enter to many trailers into say "Zone A" How can I restrict each zone to 50 trailer entries. Then if you try to put in 51 it will pop an error message.

    The table for Zones has the following values

    Zone A
    Zone B
    Zone C
    Zone D

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    how is the data being entered?

  3. #3
    Join Date
    Feb 2007
    Posts
    348
    I assume the table for the zone is a lookup table to another table that holds the number of trailers. I also assume that the table of trailers doesn't delete trailers that have fulfilled their job. So it has some kind of complete marker.

    Am I right so far or way off?

  4. #4
    Join Date
    Oct 2007
    Posts
    17
    I'll explain this a bit better. What happens here is we have guards who let trailers into the building. When they enter the building the guard enters what kinda trailer and all this nice stuff into the Main Menu Form of the database. On top of all the specs of the trailer the guard in that same form must add a location the trailer will be stored Zone A, B, C, D, E. All of this information gets stored into a table. The Zone's are all in their own separate table. Each zone only has a certain amount of available spots. What is happening here is that the guards are entering more trailers into a given location than they are suppose to and I need to squash this problem.

  5. #5
    Join Date
    Oct 2007
    Posts
    17
    One other thing is that when the trailers leave there is a check box that marks them as departed.

  6. #6
    Join Date
    Oct 2007
    Location
    Washington D.C.
    Posts
    24
    What about instead of giving an error on the 51st trailer, just make the command button conditional based upon the number already there.

    In other words, once the 50th trailer is loaded in Zone A, then when Zone A was selected, the command button would be greyed out.

    Similar to the concept of the command buttons when working with a record set... if the recordset.EOF was true, then the "Next Record" button would be inoperable.

  7. #7
    Join Date
    Oct 2007
    Posts
    17
    Now it's a drop down box and they select it. So when they drop down the box and say A is full it will be grayed is what you're saying? I've never done this so ill have to try and figure it out but it could work.

Posting Permissions

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