TSIsolutions
MIS
I'm having quite a bit og problems trying to get rid of this Write Conflict Error. Maybe someone can figure it out.
This is my dilemna:
I have a Main Form with a subform.
When a user wants to EDIT or ADD a Record, both the Main Form and the subform's Recordsources are changed to temporary tables and information relevant to the current record (in the Main and subform) are copied to the temp tables so that the user can make changes or decide to undo the changes without affecting original tables.
Once information is edited, I run a Docmd.RunSQL command to transfer the new information back to the original tables and set the Recordsource of the Main Form and subform back to the original tables and delete the records in the temp tables. No problems there.
When the record is Edited (meaning the record already exists in the original tables) I do not get any errors. However, when the record is NEW, I get a Write Conflict when attempting to switch the Recordsources to the original tables.
I cut and paste the information from the Write Conflict error and it seems to come from the subform. As if the records from the subform were not saved properly.
After reading quite a few threads I am still at a loss.
I've tried using Docmd.Save and Docmd.Runcommand acCmdSaveRecord but it doesn't work.
What baffles me is that it works when Editing an exisiting record but it gives me a Write conflict when the record is new.
Does anybody have any suggestions? I would really appreciate it.
This is my dilemna:
I have a Main Form with a subform.
When a user wants to EDIT or ADD a Record, both the Main Form and the subform's Recordsources are changed to temporary tables and information relevant to the current record (in the Main and subform) are copied to the temp tables so that the user can make changes or decide to undo the changes without affecting original tables.
Once information is edited, I run a Docmd.RunSQL command to transfer the new information back to the original tables and set the Recordsource of the Main Form and subform back to the original tables and delete the records in the temp tables. No problems there.
When the record is Edited (meaning the record already exists in the original tables) I do not get any errors. However, when the record is NEW, I get a Write Conflict when attempting to switch the Recordsources to the original tables.
I cut and paste the information from the Write Conflict error and it seems to come from the subform. As if the records from the subform were not saved properly.
After reading quite a few threads I am still at a loss.
I've tried using Docmd.Save and Docmd.Runcommand acCmdSaveRecord but it doesn't work.
What baffles me is that it works when Editing an exisiting record but it gives me a Write conflict when the record is new.
Does anybody have any suggestions? I would really appreciate it.