Write conflict in Access 2000

D

Del

I'm building a Preventive Maintenance database to record PM on our machines.
On my PM form, which has no Record Source, I have a number of combo boxes for
the user to ID his machine. When the user IDs his machine a subform appears
with its PM tasks and a control to record any maintenance comments. I used
the subform's Record Source query builder to build a query that looks at the
table containing the tasks for all our machines and filters them by the
selection the user made to ID his machine. (Each PM task has its own record
in the table) Because there are multiple PM tasks and the maint. comment is
common to all of them, I placed the tasks in the Detail section of the
subform and the maint. comment control in the subform Footer. When the maint
comments control is updated I use the following code to copy the comment to
each PM task record.

'Store contents of memPMNote
Dim strPMNote
strPMNote = Me.memPMNote

'Copy text to PM Note of each related task
DoCmd.RunSQL "UPDATE tblPMCurrentTasks " & _
"Set [PMNote]='" & strPMNote & "'" & _
"Where [EquipID]= " & Forms!frmPM!txtEquipID & " And [PMCycle]='" & _
Forms!frmPM!cboCycle & "';"

This code does what I want done but when I try to move the focus back to the
parent form I get the following message.

"This record has been changed by another user since you started editing it.
If you save the record you will overwrite the changes the other user made.
Copying the changes to the clipboard will let you look at the values the
other user entered and then paste your changes back in if you decide to make
changes."

This has been a lengthy explanation. I hope someone can understand it and
help me.
 
T

Tom van Stiphout

On Tue, 12 Feb 2008 08:42:01 -0800, Del

You may want to .Requery the subform before moving the focus.

If I understand you correctly your query is saving to the subform
table. Then setting focus to the parent form causes the subform to
save.

-Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Compile Error 1
Write Conflict 2
write conflict error 7
write conflict 3
Write/edit conflict 2
Write Conflict 8
Write Conflict - Access 2000 1
Suppress the Write Conflict Dialog Box 4

Top