Z
ZEKE
The error message box reads:
Error 3197 "Write Conflict"
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.
Copy 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.
The "Save Record" button is not available.
Background:
I am working with Access 2003 SP3 on a Windows XP Professional version 2002
SP3 machine. Table reside on a SQL Server 2005 and are linked via ODBC to
the Access database.
Now I will explain my problem.
I have a Form called "Jobs" bound to the "Header" table . It has two tabs
each has a subform. Tab1 subform is unbound and has no issues. Tab2 subform
is bound to the "Details" table with the Parent/Child relationship to Form
"Jobs". The "Details" table has fields and one of those fields is a Boolean
field called "IsRemoved". "Details" subform Recordsource has WHERE
"IsRemoved" = False. The subform displays this field as a checkbox. When
user clicks on a "IsRemoved" checkbox to remove this record, i use SQL to
identify all records associated with this one record and mark them
"IsRemoved" = true as well. The error occurs here when I try to requery the
subform to remove the records marked "IsRemoved".
Code below:
'Mark all associated records IsRemoved field True as well
strSQL = "UPDATE Details SET Details.IsRemoved = True "
strSQL = strSQL & "WHERE (((Details.HeaderID)=" & Forms!Header!ID & "))"
DoCmd.RunSQL (strSQL)
'Requery subform "Details" to hide records marked IsRemove = true
Forms!Header![Details].Form.Requery
The error pops up when trying to execute the requey line.
I trap the error after the user clicks on any button or the X and error
handle it to retry then requery line and then resume next. The error does
not occur again and then code finishes to do exactly what I asked it to do.
All my Bit fields in my SQL tables do not allow null (0 or -1) and every
tables has a TimeStamp field in it.
So my question is, What do I need to do to prevent the user from seeing this
"Write Conflict" message pop up?
Sorry for the long narrative. But I read posts all the time that do not
provide enough information to diagnose the problem.
Error 3197 "Write Conflict"
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.
Copy 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.
The "Save Record" button is not available.
Background:
I am working with Access 2003 SP3 on a Windows XP Professional version 2002
SP3 machine. Table reside on a SQL Server 2005 and are linked via ODBC to
the Access database.
Now I will explain my problem.
I have a Form called "Jobs" bound to the "Header" table . It has two tabs
each has a subform. Tab1 subform is unbound and has no issues. Tab2 subform
is bound to the "Details" table with the Parent/Child relationship to Form
"Jobs". The "Details" table has fields and one of those fields is a Boolean
field called "IsRemoved". "Details" subform Recordsource has WHERE
"IsRemoved" = False. The subform displays this field as a checkbox. When
user clicks on a "IsRemoved" checkbox to remove this record, i use SQL to
identify all records associated with this one record and mark them
"IsRemoved" = true as well. The error occurs here when I try to requery the
subform to remove the records marked "IsRemoved".
Code below:
'Mark all associated records IsRemoved field True as well
strSQL = "UPDATE Details SET Details.IsRemoved = True "
strSQL = strSQL & "WHERE (((Details.HeaderID)=" & Forms!Header!ID & "))"
DoCmd.RunSQL (strSQL)
'Requery subform "Details" to hide records marked IsRemove = true
Forms!Header![Details].Form.Requery
The error pops up when trying to execute the requey line.
I trap the error after the user clicks on any button or the X and error
handle it to retry then requery line and then resume next. The error does
not occur again and then code finishes to do exactly what I asked it to do.
All my Bit fields in my SQL tables do not allow null (0 or -1) and every
tables has a TimeStamp field in it.
So my question is, What do I need to do to prevent the user from seeing this
"Write Conflict" message pop up?
Sorry for the long narrative. But I read posts all the time that do not
provide enough information to diagnose the problem.