How do I limit the number of records in a table?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to share a database with another group but want to limit their use to
a trial type situation. Therefore, I want to limit the number of records they
enter into the main table to 100. How do I do this?
 
Richard C. said:
I want to share a database with another group but want to limit their use to
a trial type situation. Therefore, I want to limit the number of records they
enter into the main table to 100. How do I do this?

If you use an incrementing ID field as the PK you can set the Validation rule to
<101. After the 100th record they will get errors on attempts to add records.
 
If you use an incrementing ID field as the PK you can set the Validation rule to
<101. After the 100th record they will get errors on attempts to add records.

Well, yes, but if they delete records and then want to add more, or
even start adding a couple of records and think better of it (so the
PK count has been incremented), you will rapidly hear yelling and
screaming. I think that the OP is going to need to keep an
incrementing and decrementing counter somewhere, or set a flag and
count flagged records from an appropriate Select Query before allowing
a new one to be added.

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top