from wont open read only

oli82

Registered User.
Local time
Today, 21:36
Joined
Jan 10, 2008
Messages
54
Morning,

I am trying to open a form in read only but the script I run doesnt seem to do the job.

Private Sub CmdGoEvent_Click()

DoCmd.OpenForm "Tbl_localData", , , "[Sequence_Interpretation] = " & Combo4, acFormReadOnly

End Sub


Thanks,

Oliver
 
Is your WhereCondition valid? What happens if you just leave out the WhereCondition?
 
hi,

no i checked and without the where statement the form still opens up editable. I really cant see where this is going wrong have used this many times.

Any help would be really gratefull.

Thanks,

Oliver
 
You may be experiencing some corruption. Have you imported everything into a new db yet? How about Compact and Repair? What version of Access?
 
no data in the new db yet. have tried compact and repair, using access 2007 but saving as a 2003 file version, coauthor is using access 2003 - he has been having trouble with some code corrupting it.

If it keeps corrupting, do i simply copy everything over to a new access file and build it up again from scratch.

Thanks,

Oliver
 
ruralguy,

I just copied over the all the forms etc to a new blank database it worked the first time and then when i saved the database it stopped being read only, is this because the code is corrupting somewhere?

Thanks,

Oliver
 
Try this instead:

Code:
DoCmd.OpenForm "Tbl_localData", , , "[Sequence_Interpretation] = " & Combo4
   With Forms("Tbl_localData")
      .AllowEdits = False
      .AllowAdditions = False
      .AllowDeletions = False
   End With
 
Thanks bob, will give it a go.

Cheers,

Oliver
 
ruralguy,

I just copied over the all the forms etc to a new blank database it worked the first time and then when i saved the database it stopped being read only, is this because the code is corrupting somewhere?

Thanks,

Oliver
Did you copy or Import?
 

Users who are viewing this thread

Back
Top Bottom