Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

FORM OPENED AS acReadOnly IS WRITING!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Glint - 02 Apr 2008 21:57 GMT
Hi Guys,
I sometimes want my forms in read only mode, and so I would issue a command
like:  DoCmd.OpenForm "AssetsGeneral", , , "[Disposed] Is Null",
acFormReadOnly.
But I was very surprised to find that the form opened and allowed data
entry. Even when I added the following, the form still wrote:    
   Forms!AssetsGeneral.AllowEdits = False
   Forms!AssetsGeneral.AllowAdditions = False
   Forms!AssetsGeneral.AllowDeletions = False
I do not want to go through the trouble of creating another form that would
do what I want. Can someone explain what went wrong? I use Access 2005.
Signature

Glint

Allen Browne - 03 Apr 2008 02:36 GMT
You probably have some code that is dirtying the form. In their wisdom,
Microsoft decided that if you are already editing a record, they had better
let you finish it regardless of the settings, or you would be stuck there
and unable to continue.

Look for any code that assigns a value to a bound control. Particularly
suspect would be anything in the form's Current, AfterUpdate, Open, or Load
events. Similarly anything in the Enter or GotFocus event of the first
contol on the form.

Using Access 2005 sounds like fun.  :-)

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi Guys,
> I sometimes want my forms in read only mode, and so I would issue a
[quoted text clipped - 9 lines]
> would
> do what I want. Can someone explain what went wrong? I use Access 2005.
John W. Vinson - 03 Apr 2008 06:51 GMT
>You probably have some code that is dirtying the form. In their wisdom,
>Microsoft decided that if you are already editing a record, they had better
>let you finish it regardless of the settings, or you would be stuck there
>and unable to continue.

Verrrrrry interesting....

Thanks, Allen, I was not aware of that cute little oddity!
Signature


            John W. Vinson [MVP]

Glint - 03 Apr 2008 10:52 GMT
Whoa! Thanks Allen.
I guess I have to reviw a lot of things. Many forms that I had assumed would
be read only are probably writing like mad.
Thanks again.
Signature

Glint

> You probably have some code that is dirtying the form. In their wisdom,
> Microsoft decided that if you are already editing a record, they had better
[quoted text clipped - 21 lines]
> > would
> > do what I want. Can someone explain what went wrong? I use Access 2005.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.