Restrict a Table number of Records

R

Rick Brandt

Is it possible to restrict a table to only 3 Records.....Thanks Bob

Make the primary key an integer (or byte) field with a validation rule of
greater than 0 and less than 4.
 
B

Bob Vance

Thanks Rick , My Primary Key only has Long Integer! and Validation Rule wont
except >0 Or <4
Regards Bob
 
J

John W. Vinson

Thanks Rick , My Primary Key only has Long Integer!

Ummm... that can be changed. Or for that matter left alone (though using only
three out of four billion odd possible values is a bit wasteful)
and Validation Rule wont
except >0 Or <4

Syntax should be

[ID] > 0 AND [ID] < 4
 
L

Larry Linson

Wasteful of storage is not much of a concern these days -- disk and main
memory are cheap. The long integer, normally, is aligned in memory so that
it likely performs better than a shorter variable/field would (at least in
the past); on the other hand, compute power is also cheap, these days, too.
So maybe it is just a tossup.

Larry Linson
Microsoft Office Access MVP


John W. Vinson said:
Thanks Rick , My Primary Key only has Long Integer!

Ummm... that can be changed. Or for that matter left alone (though using
only
three out of four billion odd possible values is a bit wasteful)
and Validation Rule wont
except >0 Or <4

Syntax should be

[ID] > 0 AND [ID] < 4
--

John W. Vinson [MVP]

__________ Information from ESET Smart Security, version of virus
signature database 4001 (20090411) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________ Information from ESET Smart Security, version of virus signature database 4001 (20090411) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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