Subform wont allow edit records

chadb

Registered User.
Local time
Yesterday, 21:34
Joined
Dec 13, 2005
Messages
18
I've created a form that contains two subforms. Subform1 is a datasheet, subform2 is a regular form containing a subform (subform3) of it's own which is a datasheet.

Subform2 is linked to display detail information based on subform1...which works fine. Subform3 is linked to subform2 displaying additional details. When I open the master form everything displays ok and subform3 displays the correct information, but when I click on one of the records to edit it the form refreshes about 5 times and then record 1 in subform3 gets selected. In other words, I am unable to select any other record except record 1 in subform3 and thus unable to edit the records.

I have subform3 set to allow edits, additons, deletions and when I open subform3 by iteself I am able to edit/add/delete just fine.

This would all work fine if I did not need to edit subform3...all the links work perfectly and display's correct information. I am stumped. I hope I am missing something obvious.

Thanks.
 
One other thing...subform3 is linked to subform2...if I turn OFF the link then subform3 work fine, allowing me to edit/add/delete; however, it displays ALL the data.

I've tried using a different query and adding filter criteria in the query based on subform2, but I get the same results when subform3 is linked to subform2.
 
Can you post your db stripped of any sensitive data but with enough sample data to demonstrate the issue? Your problem could be any number of things.
 
Ok, here is the file. Open the form titled "Healthbenefits". I've modified it slightly from my original post. I now have three separate subforms. The problem now is that if subform3 is linked then it constantly calculates causing it to constantly refresh...although I am able to edit the subform like I desire. If I remove the link then it does not have that problem, but I need it linked.
 

Attachments

Does this work better? I strongly suggest you begin basing forms on querys rather than tables.
 

Attachments

Last edited:
Much better! Thanks!

To save time looking at all the settings, can you describe what it was that I had wrong or you changed to make it work?

Thanks!
 
I think it was changing the name of the Emp_ID textbox on the HealthBenefits subform1 that stopped the cycling. Access has a bad habit of naming a control the same as the field it displays and then getting confused when you reference it. I also added an Emp_ID control to the HealthBenefitssubform as a backup. I don't know what fixed the problem for sure. Sorry.
 
I'll play with it and see if I can isolate what it was exactly. In any event, thanks for your quick help. You've saved me a ton of time!
 

Users who are viewing this thread

Back
Top Bottom