By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

Only one record in a table

P: n/a
I have a table that only should contain one record.
I know there is a function to make sure that only one record can be written
into a table but I cannot find it.
Can anybody help me with this,please?
regards
Orjan
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Add a field to your table with these properties:
Name ID
Type Number
Size Long Integer
Default Value 1
Validation Rule =1
Mark the field as primary key.

The record cannot be saved unless the field has the value 1.
Since it is the primary key, no other reccord can be created.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Orjan" <or************@sparay.se> wrote in message
news:wW*********************@newsc.telia.net...
I have a table that only should contain one record.
I know there is a function to make sure that only one record can be
written
into a table but I cannot find it.
Can anybody help me with this,please?
regards
Orjan

Nov 13 '05 #2

P: n/a
On Mon, 11 Oct 2004 12:22:52 GMT, "Orjan" <or************@sparay.se>
wrote:
I have a table that only should contain one record.
I know there is a function to make sure that only one record can be written
into a table but I cannot find it.
Can anybody help me with this,please?
regards
Orjan

One way would be to have an autoincrement field with a validation
condition =1
David
Nov 13 '05 #3

P: n/a
"Orjan" <or************@sparay.se> wrote in message
news:wW*********************@newsc.telia.net...
I have a table that only should contain one record.
I know there is a function to make sure that only one record can be written into a table but I cannot find it.
Can anybody help me with this,please?
regards
Orjan

Give the table a primary key with a type such as long integer and specify a
validation rule for that field such as =1
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.