Wasn't quite sure how to search this topic.
My (1st) db is about to be distributed to multi-users. I would like to make
all my forms read-only and add an "Edit" button on each users can't
accidentally overwrite existing records. Also lock older records as per
another post I read today.
Am hoping to open forms read-only from the Switchboard buttons. But the
default buttons seem to only allow Data Entry or edit. If possible I want to
keep the built-in Switchboard because our network is very slow so we want the
switchboard table on each user's pc. (they have to close all forms but can
keep the Switchboard running and not have to re-login every time they need
it)
Does anybody know how I can change the Switchboard button code to open
read-only but still allow a new "edit" button to open again AllowEdits.
And will the "edit" button cause problems? For example, do I have to close
the form & re-open, etc. in the code, or what would be the smartest way to do
this and revert back to read-only on "save"?
Any help is much appreciated!!

Signature
Lungta
Graham Mandeno - 01 Oct 2006 21:33 GMT
Hi Lungta
You can switch the entire form between read-only and editable using the
AllowEdits property:
Me.AllowEdits = True makes the form editable
Me.AllowEdits = False makes it read-only
You could have the code in the Form_Load event procedure set AllowEdits to
False, and then have the click event of your "Edit" button set it to True.

Signature
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
> Wasn't quite sure how to search this topic.
>
[quoted text clipped - 23 lines]
>
> Any help is much appreciated!!
Douglas J. Steele - 01 Oct 2006 21:38 GMT
Set the AllowEdits, AllowDeletions and AllowAdditions properties of your
forms to False. In the Edit button's Click event, set those properties to
True.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Wasn't quite sure how to search this topic.
>
[quoted text clipped - 23 lines]
>
> Any help is much appreciated!!
Lungta - 01 Oct 2006 23:21 GMT
Thanks to both of you for your help - I tried both your suggestions and they
work great! I'm just stuck on one thing.
The Save button is where I put the code to revert back to
Me.AllowEdits=False, Me.AllowAdditions=False, etc. But if a user simply
moves to another record, the "allow edits" stays live.
Is there a better spot for putting this code, or a way to reset it somehow
on Current record?
Thanks,

Signature
Lungta
> Wasn't quite sure how to search this topic.
>
[quoted text clipped - 18 lines]
>
> Any help is much appreciated!!
Ron2006 - 02 Oct 2006 17:19 GMT
Try putting the
me.allowEdits=False
in the oncurrent Event.
This will make the default as no edits.
Ron
Lungta - 02 Oct 2006 18:44 GMT
Ron,
That's just the extra bit I needed - thanks a bunch!!

Signature
Lungta
> Try putting the
>
[quoted text clipped - 5 lines]
>
> Ron
Ron2006 - 02 Oct 2006 19:40 GMT
Glad that was it. Have a great day.
Ron