Read only form suddenly becomes editable

P

Pete

Re Access 2003

I have developed a security framework which sets the AllowEdits,
AllowAdditions & AllowDeletions accordingly: 1=No Access (form closes),
2=Read Only & 3=Full Access. This all takes place in the Form_Load event. If
set to read only, the user can view, but cannot edit or add a record.
This all works fine when the user is typing directly into text boxes etc.

The problem:
I have a button in the detail section on the form, which uses the Windows
file dialog to add the full path/filename to a locked textbox on each record.
When the user selects a file this way, Access suddenly switches the form to
be editable - all of its own accord :eek:(

I can, of course, disable the button if the form is opened as Read Only, but
is this normal behaviour from Access??

Many thanks.
 
L

Linq Adams via AccessMonster.com

Yes, this is standard behavior! When you have a 'locked' form and you change
a control's data using code, the current record is no longer 'read-only'
until the record is saved. Simply follow your textbox assignment statement
with

Me.Dirty = False

and it'll remain locked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top