Solved

Access Form Allows Editing with AllowEdits set to False

Posted on 1998-09-02
8
638 Views
Last Modified: 2009-12-16
I am having what appears to be mysterious, and inconsistent behavior in one form in a database that has several other forms that are not exhibiting the same behavior.
 
The problem is related to the AllowEdits property of the form.  It is set to No, and I also set Me.AllowEdits = False within code behind the form.  All the other forms within the application use the same logic and do not allow editing.  Yet the problem form allows edits at anytime, even when started directly from the database/forms window. As a further clue, this problem form also allows records to be deleted with no warning dialog - all other forms and tables respond with the verify delete dialog.
0
Comment
Question by:griggscl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 1

Expert Comment

by:LostSoul
ID: 1961081
What kind of a form is it that allows the edits?  Is it by chance a form that contains a sub-form?
0
 

Expert Comment

by:Decorules
ID: 1961082
Have you tried running Repair Database on this database. It might help and then compress the database.

The other option is to set the record type in the trouble form to snapshot not dynaset. (thats if you want to just view the data). You should be still able to Delete records in the sub forms.
0
 

Author Comment

by:griggscl
ID: 1961083
Good comments, but not the problem as I had already repaired & compacted.  The dynaset also is a good idea, except I do allow users to edit from this form under certain conditions.

LostSoul - yes, the form has a subform attached.  Also, the data base is split, and the backend is replicated to one other remote location.


0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 5

Accepted Solution

by:
kulikuli earned 100 total points
ID: 1961084
Open your recordsource as a query. Try editing it. You probably can't. So now you probably will know where the problem is.I hope :)
0
 
LVL 5

Expert Comment

by:kulikuli
ID: 1961085
Sorry. The above answer is incorrect. I misunderstood the question. A new attempt: Your form probably is not a bound form (it has no recordsource, or the controls you are trying to edit don't have a recordsource. Allowedits is only valid for bound controls. Hope this helps
0
 
LVL 1

Expert Comment

by:ljb
ID: 1961086
I have had similar problems (Access 2) with forms which have subforms.  If I tried to make the form read only programatically, i.e. depending on the menu choice made by the user, I could never seem to make the subform readonly.  The main form would sometimes be and i did not seem to be able to make it behave dependably all the time.  I resorted to some code found in the Access Developers magazine which loops through all your controls and toggles between read only and updatable.  If you like I can supply the code?  This works reliably for me - now in 97 too.
0
 
LVL 1

Expert Comment

by:LostSoul
ID: 1961087
Either I'm misunderstanding your problem or you aren't expressing it properly, anyway...

I assume the edits you want to disallow are on the subform as opposed to the main form.  If this is the case, you have to open up the subform in design view (double click on it while the main form is in design view) and set the subform to allow edits - no.  Programatically:

forms![MainFormName]![SubFormName].form.allowedits=false
or if setting it from the main form
me![SubFormName].form.allowedits=false

You won't have to loop through all the controls and set their properties individually as suggested above by ljb as I've never seen such a problem before in Access 97.

You aren't giving enough details in your question.  All of the answers you have been given so far are based on assumptions made by the people giving them to you.

0
 

Expert Comment

by:paulvb
ID: 3246475
Has anyone answered this question yet I am having the same problem, I have forms that are set to AllowEdits = False, and work fine. I have one form set to AllowEdits = False that will allow edits. After testing the form it allows edits until the Esc key is hit twice. Any suggestions to this?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question