Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Additions, Deletions, Edits, Oh my!

Status
Not open for further replies.

bcooler

Programmer
Jun 13, 2009
132
My last question was not very clear, so I'll try again.

I have a form with 2 subforms. Each subform also has a subform.

For some reason, the subform (and sub-subform sometimes) occasionally will have the Additions, Deletions, and Edits property changed to "No", effectively removing the capability of my users to add information into the data entry form.

This just recently started happening after 1 year of no problems. The only thing I can say is I recently created a new read-only form that pulls in the same subforms described above. The form is set to turn the above options off.

Here's where I am guessing (which probably is what's causing the confusion). I thought the form's properties flow into the subform (or as I was corrected before, a subform is just another control, assuming the form's properties). If so, why aren't the subform's properties reset when using the data entry form?

How do I correct the issue? My hope is the solution is a little more elegant than a "me.formname!subformname!AllowAdditions = True" type VBA solution.
 
bcooler . . .

Should your question really be:
TheAceMan1 said:
[blue]How do I make previously saved records [blue]Read Only![/blue] ... while having the capability of adding new records?[/blue]
I could be wrong, but it appears as if this is what you really want to do.

If the above is incorrect, then simply atate what it is you want to do (don't explain the forms ... explain what you want to do!)

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
How about...

"How do I keep subforms from randomly going read only?"

One day I go into the form and the subform is read/write. The next day, it's been turned to read only and my users can't enter data. Something changed.

Either another form accessing the same subform has modified the subform's properties, or something is getting changed while I'm using the main form. I've looked in the VBA and didn't see any property changes that could have affected this.
 
Well, dont't use the acSaveYes argument in the DoCmd.Close call ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the suggestion. I just checked, and I only use

DoCmd.Close , ""

in my VBA.

Thanks so much for writing back!
 
bcooler . . .

Unless you have some corruption, indications are some code is setting the properties.

Perform a search in VBA for the formname. Perhaps this will reveal the culprit.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
I did a project wide search in VBA and did not find and AllowEdits or AllowDeletions....
 
I did the replacement and am waiting to see if the unknown cause has been corrected.
 
Ok, I've changed the DoCmd.Close call as suggested with no improvement.

I was wondering (but unable to prove) if the user could accidentally press the save button while the form was loaded as read only, which then saves the form this way for the next user? It didn't work when I tried it, but seemed like a possibility. Maybe I was testing it incorrectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top