UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Resolving Write Conflict, Access 2016    
 
   
isladogs
post Oct 8 2019, 03:15 PM
Post#21


UtterAccess VIP
Posts: 1,834
Joined: 4-June 18
From: Somerset, UK


That doesn't sound like the cause to me but as I said, I haven't looked at your code.
You can force data saves E.g
CODE
If Me.Dirty Then Me.Dirty =False


Also check recordsets are closed after use (possibly irrelevant but good practice anyway) etc

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
KarinG
post Oct 8 2019, 03:50 PM
Post#22



Posts: 21
Joined: 24-August 05



Hi Colin.
I had "If Me.Dirty Then Me.Dirty = False" already in there, but I added a few more at key spots. I also double checked that I was closing all recordsets. I am still getting the same error.
Karin
Go to the top of the page
 
isladogs
post Oct 8 2019, 04:40 PM
Post#23


UtterAccess VIP
Posts: 1,834
Joined: 4-June 18
From: Somerset, UK


It shouldn't be necessary to keep reusing that line.
I'm about to logoff so won't be reviewing your lengthy code tonight. Hopefully someone else will.
In the meantime have you tried stepping through the code to check what triggers the conflict?

Perhaps you need to post a stripped down version of your app to illustrate the issue

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
KarinG
post Oct 9 2019, 10:52 AM
Post#24



Posts: 21
Joined: 24-August 05



It is the Me.Requery that triggers the error. I will try removing some code so I can post a condensed version of what is causing the error.
Go to the top of the page
 
KarinG
post Oct 9 2019, 12:17 PM
Post#25



Posts: 21
Joined: 24-August 05



I found the statement causing the issue.

CODE
Forms![frmVendorMain]![optGroupStatus] = 2

It doesn't like it when I make a change on the main form. I can make changes on the tabs but not the main area. I tried putting the Me.Dirty = False right after I make the edit on the main form but it still gives a write conflict error.

To get around it I had to update the information via a recordset instead of updating the form.
This post has been edited by KarinG: Oct 9 2019, 12:30 PM
Go to the top of the page
 
theDBguy
post Oct 9 2019, 12:43 PM
Post#26


Access Wiki and Forums Moderator
Posts: 76,602
Joined: 19-June 07
From: SunnySandyEggo


Hi. Glad to hear you got it sorted out. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
2 Pages V < 1 2


Custom Search


RSSSearch   Top   Lo-Fi    21st November 2019 - 09:08 AM