Restricting the maximum amount of records for a table.

  • Thread starter Thread starter A. Smith
  • Start date Start date
A

A. Smith

RE: Microsoft Access 97

Hi,

I would like to know if there is a way to restrict the amount of records
that a user can enter into a table?
For example, can I set the maximum amount of records in a table to 30
records. Thus, if a user attempts to add the 31st record, the user would be
prohibited from doing that.
Thanks for your assistance.

Regards,
Alex
 
You could do this by code in the BeforeInsert event of a form. The code
could count the # of records already in the table, and Cancel the insert if
the limit was reached.

But why do you want to do this?

HTH,
TC
 
RE: Microsoft Access 97

Hi,

I would like to know if there is a way to restrict the amount of records
that a user can enter into a table?
For example, can I set the maximum amount of records in a table to 30
records. Thus, if a user attempts to add the 31st record, the user would be
prohibited from doing that.

One way to do so is to define an Integer field Primary Key, and set
its Validation Rule to
 
Back
Top