Limit table to 1 record

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

Guest

I have a database that includes a "settings" table. The settings table
should only have 1 record. I have tried to design the form used to enter the
settings to not allow the user to create additional records but it sometimes
occurs. One such way to "accidentally" add a record is to hit the page-down
key when on the form.

Is there a way to set a table property to not allow more than one record?

Thanks in advance.
 
You could add an autonumber primary key to the table and set a table
Validation Rule to only allow records with an autonumber value of the
current value in your table.
 
Add a RecordID field, set the value to '1'. Then add an IF statement to your
data load function checking for a record with an ID of 1. If it exists, the
load function fails.

HTH

Sharkbyte
 
great idea. Thanks.

Duane Hookom said:
You could add an autonumber primary key to the table and set a table
Validation Rule to only allow records with an autonumber value of the
current value in your table.
 
Back
Top