How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

I have a form with SAVE action in the action bar. Once the user creates a document using this form and saves, I dont want anyone else to open the document and edit it by changing the field values.

Any help with this is greatly appreciated.

Thanks in advance.

Regards,

Madhunandan

Subject: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Dear MadhuCreate an Flag Field…

Update the Flag Field to 1 or 0… when saved…

then check in the query mode change and postopen…

if flag=“1” then

Msgbox “Document is Locked… cannt be edited anymore”

else

end if

Subject: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Hi Madhu.

In order to prevent editing by double-clicking the document

give “continue=False” in " Form’s QueryModeChange Event.

HTH

Subject: RE: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Hi Thish,That’s exactly what I wanted. Thanks a ton.

Regards,

Madhunandan

Subject: RE: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Hi Madhu, Although what Thish had mentioned would solve your issue of preventing edit but this has a loop hole in it.WHen you rightclick on the document and choose edit(Ctrl+E) the document would open in edit Mode.

To solve this use the post open event of the form and specify For a docuemnt that has been already saved.source.editmode = False.

This would prevent the editing of document in all conditions.

Hope this helps you,

Thanks,

Venkatesh

Subject: RE: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Hi Venkatesh,Thanks for your suggestion. But even with what Thish told me, it works fine. Even now, if i right click and choose edit (Ctrl+E), it will display a message that “The document cannot be edited.”

Regards,

Madhunandan

Subject: RE: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

Hi Madhu, Please check the access level of the user with which you had checked.If the user had Reader Access then the msg that you had told would appear, but if the user had more than reader acccess then the form would open in Edit Mode.

Please check it.In that case you may have to resort to the way i had told.Cause i Had faced a similar issue sometime back.

Venkatesh

Subject: RE: How to prevent document editing (which can be done by double-clicking the document) after it has been created and saved once?

If you’re already in the document then QueryModeChange suffices, but if you’re at the view level and do Ctrl-E (or equivalent) then it would bypass that code and so you’d also want a PostOpen event that would check for the doc not being new and being in edit mode … and it would switch to read mode.

This means that your QueryMode code needs to confirm that it’s in READ mode before doing Continue=False, otherwise it’ll battle with the PostOpen code, above.

regards,

raphael