Re: Force a limit to number of rows
- From: Jamie Collins <jamiecollins@xxxxxxxxxx>
- Date: Wed, 16 Jan 2008 05:33:57 -0800 (PST)
On Jan 16, 12:36 pm, Rich K <Ri...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I want to limit the number of rows in a table for demonstration purposes. I
seem to recall that this can be done in the advanced properties of the table
in the validation Rule but I can't recall the syntax.
I'd suggest you define a Jet CHECK constraint on the table e.g.
something like:
ALTER TABLE MyTable ADD
CONSTRAINT we_know_where_you_live
CHECK (3 >= (SELECT COUNT(*) FROM MyTable AS T2));
The Access user interface does a stupendous job of hiding CHECK
constraints from users, to the point where Microsoft haven't even
documented them in the Help (or anywhere else, in fact), and should
baffle most casual users ;-)
Jamie.
--
.
- Prev by Date: Re: displaying an "alias" value in a table
- Next by Date: Re: Table Setup
- Previous by thread: Re: displaying an "alias" value in a table
- Next by thread: Re: Force a limit to number of rows
- Index(es):
Relevant Pages
|