how to limit maximum records in an access table?

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

Guest

I have a small Access 2002 DB with two tables. I want to limit the max
number of records in one of the tables to say 10 records regardless. i don't
want to write code to count the number of records. Any table property I can
set for this purpose?

Thanks
Wee.
 
Wee said:
I have a small Access 2002 DB with two tables. I want to limit the
max number of records in one of the tables to say 10 records
regardless. i don't want to write code to count the number of
records. Any table property I can set for this purpose?

Thanks
Wee.

Not perfecty reliable but you can use an incrementing AutoNumber field and set a
validation rule on the field of <11. The reliability is due to skipped numbers
if an insertion is cancelled etc., but after 10 AutoNumber values have been
consumed the table would no longer accept new records.
 
you should use ACCESS DATA PROJECTS.. this has this functionality built
in and it ROCKS!!!
 
Rick said:
Not perfecty reliable but you can use an incrementing AutoNumber
field and set a validation rule on the field of <11. The reliability
is due to skipped numbers if an insertion is cancelled etc., but
after 10 AutoNumber values have been consumed the table would no
longer accept new records.

Not that it is a bad solution (I was thinking of the same thing so I
must be good :-)) but remember that you will not automatically reclaim a
space if you delete one of the ten using the autonumber method.

You could write code, but you said you don't want to do that.
 
you should use ACCESS DATA
PROJECTS.. this has this functionality built
in and it ROCKS!!!

Your posts would be much more credible if you backed up your promotional
puffery with some how-to information.

Larry Linson
Microsoft Access MVP
 
ADP has this little recordcount selector on it in datasheet view

you can either do the clientside recordcount limiter; or you can do the


Select Top 10 * from sysobjects where name like '%happysproc%'
 
???, what are you talking about? The original post was about Access DB, not
SQL Server/MSDE, it has nothing to do with ADP.
 

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

Back
Top