Restricting the maximum amount of records for a table.

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
 
T

TC

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
 
J

John Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top