Storage of Values

  • Thread starter Thread starter CountM
  • Start date Start date
C

CountM

I would like to enter a value or values on a form and have
them saved and available to me each time I open and use
the database. They will be maintained and represent year
and month. I could link the form to a table, but I only
want 1 (only) entry to this table. How do i do this?
 
I would like to enter a value or values on a form and have
them saved and available to me each time I open and use
the database. They will be maintained and represent year
and month. I could link the form to a table, but I only
want 1 (only) entry to this table. How do i do this?

You can limit a table to allow only one record by giving it an integer
Primary Key, with a validation rule of

=1

Enter a record with 1 in this field (and the month and year in other
fields). You won't be able to add any new records because they'd
either have 1 in the primary key field, causing a key violation (there
can only be one record for a given PK value), or if you try to add a
record with some other value it will fail the validation rule.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top