Single Record Table

HarrySpencer

Registered User.
Local time
Today, 22:41
Joined
Apr 10, 2007
Messages
25
Hello,

I've creating a database that will only need to store a single record in one of the tables. This table will be linked to another that can store multiple record, like a workplace and employee.

There is only one workplace so I only want there to be one record in this table this record can be edited as often as need be but no additional records can be added and there will be no need for any navigation as only the first record will need to load.

Is there an easy way to do this? Or can anyone suggest some code to stop the form trying create new records with scrolling with the mouse?

Cheers, Harry
 
If it is a bound form then set the
Allow Additions = No
Allow Deletions = No
Navigation buttons No
Scroll bars Neither
Records pointers = No
 
yes it is bound and that makes perfect sense. Cheers
 
Just as an FYI, beyond the form maintenance of this requirement - if you enforce this requirement at the table level, you're guaranteeing that the user has no avenue to add more records (short of altering the database definition :-s).

There are a few ways of achieving this - none may seem apparent, but at least one is achievable using nothing but the Access table designer UI.
Others require code.
Have a look at this recent thread across the way for more info incase it's of interest.

One of the code methods suggested is analogous to the UI implementation.
Annoyingly I have a screenshot of what I mean that I can't use.
It centers around the concept of creating a PK (or other unique index if you prefer) which has a default value, requires that default value (validation/constraint) but due to the unique index cannot accept further rows. That contradiction ensures a single row.

Cheers.
 

Users who are viewing this thread

Back
Top Bottom