open form read only

G

Guest

I'm using the code (this is a simplification of the entire code),
sub routineName()
Dim mode as integer
Dim identifier as long
mode = 2
identifier = Me.ID.Value
DoCmd.OpenForm FormName:="frm_Entry", view:=acNormal, wherecondition:="ID="
& identifier, datamode:=mode
'some code
End sub

But when the form opens, it isn't read only. I can edit the record the form
has been filtered to. Oddly, depending on which procedure calls this
subroutine, sometiem the first field or two will not be editable, but after
tabbing through, the other fields are. Could the form be resetting to allow
edits once it's already open? Any clues as to causes/solutions?
 
G

Guest

Have you try putting acFormReadOnly in the data mode

docmd.OpenForm "formName",,,,acFormReadOnly
 

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

Similar Threads


Top