Re: Set up table to contain only one record?



Add a long integer field, make it the primary key, and enter a number into
that field. Any number will do, but for illustration let's say we choose the
number 1. Now add a validation rule to that field: =1.

--
Brendan Reynolds (MVP)

"Randy" <ranmcc@xxxxxxx> wrote in message
news:1118069438.057010.203900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> How do you set up a table that will allow one record to be entered but
> no more. Staff need to be able to change that one record, but not add
> any more.
>


.



Relevant Pages

  • Re: Limit Number of Records in a table
    ... One sneaky way is to assign an integer field as a Primary Key, ... give it a validation rule such as ... Prev by Date: ...
    (microsoft.public.access.tablesdbdesign)
  • RE: ListBox Use
    ... tables: staff and training. ... that contains both the primary key from staff and the primary key from ... display a list box of all staff members and select those that attended this ... You now have to scan that list and create an attendance record for ...
    (microsoft.public.access.forms)
  • Re: Avoiding duplicate records - Acc97
    ... > I would be making a compound primary key out of the ... > Just for good luck, I would pack the date into a Long Integer field, ... I'd strongly type as DATETIME and use CHECKs to ensure my ... CONSTRAINT start_date_value_valid CHECK ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Best Way INSERT/UPDATE
    ... Assuming I knew the primary Key; ... Then, if @@Rowcount was 0, do an Insert ... Prev by Date: ...
    (microsoft.public.sqlserver)
  • Re: Avoiding duplicate records - Acc97
    ... > I have a database where users can only create one record per day in a ... > How do I get the table to only accept one entry per UserID per Date? ... I would be making a compound primary key out of the ... Just for good luck, I would pack the date into a Long Integer field, ...
    (microsoft.public.access.tablesdbdesign)