0

I have a table that contains 3 columns:

ID            Auto increment
Username      Text
Userclass     Number

I want to give every user a userclass – this could be a number from 1 to 20, but I only want 20 users to have the same userclass.

How would I do this in Microsoft Access?

On a similar note, how would I limit the number of rows in an Access table to only 500?

2 Answers 2

0

As far as I know there is no way to enforce these types of constraints in the table design. The builtin table storage has a very limited support of constraints, and no support for triggers. You will have to build some application logic.

0

The table is the data holder. There probably isn't much you can do with restricting the table. You will have far more options using VBA with the user form. Not knowing what version you have and how your form is designed, I am limited in offering advice.

VBA will allow you to use events to trigger functions which can only allow the choice from a list of what userclass iavailablele. It can also give you the ability to check the number of records in the table and stop if the maximum is reached.

If you are not familiar with VBA, there are numerous free resources available via the Internet to learn how to use it.

1
  • 1
    thank you ..i just wanted to know how this could be done and if it is possible in any way to do it directly in the table without the need to program anything ..thanks again
    – lebhero
    Feb 29, 2012 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .