View Full Version : Can I limit a Table to only one record ?


GeoffT
09-13-2010, 12:41 PM
Have problem with operators entering dates as I cannot put input masks into the dialog boxes when they ask for a date.

So I decided to have a Table [DateFromTo] with two fields (Obviosly DateFrom and DateTo).

All OK, but wandering fingers always find an error in this sort of thing and as I need the DateFrom and DateTo to use as criteria in subsequent queries and reports I want to make sure there is only one of each.

That is, I want to prevent the operator from being able to accidentaly open a second (new) record in the table and then inputting another pair of dates.

Any help would be much appreciated.

GeoffT

PNGBill
09-13-2010, 12:54 PM
You should have your Database setup so Operators can only access Tables via a Form.

If so, it is then up to you to ensure that every Form that has controls using the two fields - these controls have their properties set to prevent Data Entry and Edit.

Checkout your Forms Properties. You can effect how a Form handles Edit and Additions, plus others and also the actual Controls "field" on the form.
These can be Locked to prevent change.

PNGBill
09-13-2010, 12:56 PM
also, if you have Security with LogIn for all uses then you can have the forms behave differently for different users.
ie, Administrators (you) can edit the Date Control but Operators can not.

gemma-the-husky
09-13-2010, 11:44 PM
you have a form, and set the cycle property to current record, probably set allow adds/deletions to false - and have no navigation buttons etc

then your users cant add new records, and can only use the single record

GeoffT
09-16-2010, 10:25 AM
Yes

Understood and problem solved.
Many thanks for the time taken to read problem and send replies.

Very much appreciated.

Regards to all.

GeoffT