A
Andy G
I've been getting a 'Write Conflict' box when using my application lately
and I was wondering if anyone could shed some light on it. I have a form
with a bunch of locked and not enabled boxes. The user will click a button
that says edit and they all turn to locked = false and enabled = true so
they can make changes. After they are done with the change they click a
button named 'Saved'. This save button sets the text boxes back to locked =
false and enabled = true. The write conflict box comes up when the user
clicks the 'Save' button. I have a field that is bound to the LastUpdtDate
and UpdateStaffID fields in the form that shows the previous values, when I
update the values in the code behind Access gets confused.
All it's doing is updating a few things in the record....
Dim sqlUPSet As String
sqlUPSet = "UPDATE tblScholar SET UpdateStaffID = " &
Forms!frmGlobal!txtUserID & " WHERE ScholarID = " & ScholarID & ";"
DoCmd.RunSQL (sqlUPSet)
Dim sqlUp As String
sqlUp = "UPDATE tblScholar SET LastUpdtDate = #" & Now() & "# WHERE
ScholarID = " & ScholarID & ";"
DoCmd.RunSQL (sqlUp)
and then this is the piece of code behind the button that it doesn't like,
which is called after the code above...all
Me.Refresh
and I was wondering if anyone could shed some light on it. I have a form
with a bunch of locked and not enabled boxes. The user will click a button
that says edit and they all turn to locked = false and enabled = true so
they can make changes. After they are done with the change they click a
button named 'Saved'. This save button sets the text boxes back to locked =
false and enabled = true. The write conflict box comes up when the user
clicks the 'Save' button. I have a field that is bound to the LastUpdtDate
and UpdateStaffID fields in the form that shows the previous values, when I
update the values in the code behind Access gets confused.
All it's doing is updating a few things in the record....
Dim sqlUPSet As String
sqlUPSet = "UPDATE tblScholar SET UpdateStaffID = " &
Forms!frmGlobal!txtUserID & " WHERE ScholarID = " & ScholarID & ";"
DoCmd.RunSQL (sqlUPSet)
Dim sqlUp As String
sqlUp = "UPDATE tblScholar SET LastUpdtDate = #" & Now() & "# WHERE
ScholarID = " & ScholarID & ";"
DoCmd.RunSQL (sqlUp)
and then this is the piece of code behind the button that it doesn't like,
which is called after the code above...all
Me.Refresh