Does anyone know how I could limit the number of rows allowed in a MS
Access table... want to limit it to 1. 9 13715 ca************@gmail.com wrote: Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1.
From a form, in the OnCurrent event, you could have something like
Me.AllowAdditions = (Me.Recordsetclone.recordcount > 0) ca************@gmail.com wrote in
news:11*********************@j52g2000cwj.googlegro ups.com: Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1.
Create an autonumbe field. set the table validation property to
[field]=1, Replace [field] with the actual name of your field.
--
Bob Quintal
PA is y I've altered my email address.
Bob Quintal <rq******@sympatico.ca> wrote in
news:Xn**********************@207.35.177.135: ca************@gmail.com wrote in news:11*********************@j52g2000cwj.googlegro ups.com:
Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1. Create an autonumbe field. set the table validation property to [field]=1, Replace [field] with the actual name of your field.
I wouldn't use a table-level validation rule, but a field-level rule
on the Autonumber field, and make it <=10 or whatever the limit on
the number of records you want to limit it to.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
"ba****@gmail.com" <ba****@gmail.com> wrote in
news:11**********************@j33g2000cwa.googlegr oups.com: use TOP function
That will work in SQL, but has nothing to do with the original
question, which is about limiting the number of rows that can be
added to a table.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in
news:Xn**********************************@127.0.0. 1: Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
ca************@gmail.com wrote in news:11*********************@j52g2000cwj.googlegro ups.com:
Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1. Create an autonumbe field. set the table validation property to [field]=1, Replace [field] with the actual name of your field.
I wouldn't use a table-level validation rule, but a field-level rule on the Autonumber field, and make it <=10 or whatever the limit on the number of records you want to limit it to.
How can you set a field validation rule for an autonumber?
There's no property for that in the design grid. (ACC2000)
--
Bob Quintal
PA is y I've altered my email address.
Bob Quintal <rq******@sympatico.ca> wrote in
news:Xn**********************@207.35.177.135: "David W. Fenton" <XX*******@dfenton.com.invalid> wrote in news:Xn**********************************@127.0.0. 1:
Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
ca************@gmail.com wrote in news:11*********************@j52g2000cwj.googlegro ups.com:
Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1.
Create an autonumbe field. set the table validation property to [field]=1, Replace [field] with the actual name of your field.
I wouldn't use a table-level validation rule, but a field-level rule on the Autonumber field, and make it <=10 or whatever the limit on the number of records you want to limit it to.
How can you set a field validation rule for an autonumber? There's no property for that in the design grid. (ACC2000)
You're right -- my brain fart.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in
news:Xn**********************************@127.0.0. 1: Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in news:Xn**********************************@127.0.0. 1:
Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
ca************@gmail.com wrote in news:11*********************@j52g2000cwj.googlegro ups.com:
> Does anyone know how I could limit the number of rows > allowed in a MS Access table... want to limit it to 1. > Create an autonumbe field. set the table validation
property to [field]=1, Replace [field] with the actual name of your field.
I wouldn't use a table-level validation rule, but a field-level rule on the Autonumber field, and make it <=10
or whatever the limit on the number of records you want to
limit it to.
How can you set a field validation rule for an autonumber? There's no property for that in the design grid. (ACC2000)
You're right -- my brain fart.
Actually, after thinking about it, you don't need an autonumber,
just an int. set the default value to 1, the primary key to the
field, and the validation rule to allow only the one number.
--
Bob Quintal
PA is y I've altered my email address.
Bob Quintal <rq******@sympatico.ca> wrote in
news:Xn**********************@207.35.177.135: "David W. Fenton" <XX*******@dfenton.com.invalid> wrote in news:Xn**********************************@127.0.0. 1:
Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in news:Xn**********************************@127.0.0. 1:
Bob Quintal <rq******@sympatico.ca> wrote in news:Xn**********************@207.35.177.135:
> ca************@gmail.com wrote in > news:11*********************@j52g2000cwj.googlegro ups.com: > >> Does anyone know how I could limit the number of rows >> allowed in a MS Access table... want to limit it to 1. >> > Create an autonumbe field. set the table validation property> to [field]=1, Replace [field] with the actual name of your > field.
I wouldn't use a table-level validation rule, but a field-level rule on the Autonumber field, and make it <=10 or whatever the limit on the number of records you want to limit it to.
How can you set a field validation rule for an autonumber? There's no property for that in the design grid. (ACC2000)
You're right -- my brain fart. Actually, after thinking about it, you don't need an autonumber, just an int. set the default value to 1, the primary key to the field, and the validation rule to allow only the one number.
Well, that works for a single-record table, but fails for any other
number of records.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dusan Chromy |
last post by:
Hi,
I was told there is a feature in Oracle to set up a table to have a
limit on the maximum number of rows in it. By attempt to insert more
rows, the oldest rows should get deleted...
|
by: emily_g107 |
last post by:
Hi,
I need to limit results in the following query type:
...
|
by: D. Dante Lorenso |
last post by:
I need to know that original number of rows that WOULD have been returned
by a SELECT statement if the LIMIT / OFFSET where not present in the
statement.
Is there a way to get this data from PG ?...
|
by: Colleyville Alan |
last post by:
From the MS Access help I have seen the limits on number of fields in an
index, objects in a db, etc. But I have seen no mention on a limit of rows.
I am considering an application that would have...
|
by: VM |
last post by:
How can I limit the use of the PC's virtual memory? I'm running a process
that basically takes a txt file and loads it to a datatable. The problem is
that the file is over 400,000 lines long (77...
|
by: Kriston-Vizi Janos |
last post by:
Dear Mr. Kern, and Members,
Thank you very much for the fast answer, my question became
over-simplified.
My source code is appended below. It uses two text files (L.txt and
GC.txt) as input...
|
by: ilkaos |
last post by:
hi all,
I checked out in google groups but was not able to find
the answer...
is it possible to limit size table in sql server?
how can I do it?
TIA
|
by: renahkw |
last post by:
How can I easily limit the amount of rows displayed in a table, and then navigate from page to page? Each row consists of 3 cells: the first, containing a varying number of images followed by some...
|
by: henryrhenryr |
last post by:
Hello!
I'm having a bit of trouble with a query. I am trying to paginate a set of results using LIMIT. Each result has a bit of 'basic' data and potentially multiple 'additional' data. I have...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |