Write Conflict - Access 2000

G

Guest

Greetings,

I am having an issue where a "Write Conflict" dialog box displays when I
navigate to another record. The 3 options on this dialog are "Save Record",
"Copy to Clipboard", and "Drop Changes". This write conflict seems to occur
after I press a command button on the main data entry form. This command
button updates the current record with whatever items were checked on the
form (as well as sends an email to the appropriate recipient). The code
below is called from the "'Click" event of this button and updates a field in
the table with the appropriate values:

Sub ProductsExpectedtoUse()
Dim db As DAO.Database
Dim lngID As Long
Dim strProductList As String
Dim strSQL As String

Set db = CurrentDb

'// Assign the value of the ID field to the variable, "lngID".
lngID = Me.txtID.Value
If Forms![frmMainSurvey].ChecHomeImp.Value = -1 Then
strProductList = "Home Improvement Loans"
Else
strProductList = ""
End If
If Forms![frmMainSurvey].CheckVacationHome.Value = -1 Then
If strProductList = "" Then
strProductList = strProductList & "Buying a Vacation Home"
Else
strProductList = strProductList & ", Buying a Vacation Home"
End If
Else
strProductList = strProductList & ""
End If

.....

If strSQL = "" Then
strSQL = "Update [Survey Results] SET ProductsExpectedtoUse = '" &

strProductList & "' WHERE ID = " & lngID
End If

db.Execute strSQL
db.Close
Set db = Nothing
End Sub

I have tried using DoCmd.Save after calling this routine, but that still
doesn't prevent the "Write Conflict" dialog box from appearing. Any
suggestions?

Thanks in advance!
 
A

Alex Dybenko

hi,
if your form also based on Survey Results table - then instead of updating
data in ti using execute - update it directly on a form
Alternatively - you have save this record before code runs, then run update
and then refresh record. but if you updating current record - easy to do
this on the form
 

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

Top