?
Solved

Access Form Allows Editing with AllowEdits set to False

Posted on 1998-09-02
8
Medium Priority
?
653 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 5

Accepted Solution

by:
kulikuli earned 200 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

Industry Leaders: 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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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