furnitureheaven
Registered User.
- Local time
- Today, 11:06
- Joined
- Aug 5, 2008
- Messages
- 36
Hi
I have got a error message in access 2003. I have 2 forms where (in one form user input the data and its store into a table)
So when user clicks the save button it’s save record in table and update a lookup table. And same time it open a 2nd form and shows the last record in the table.
Every thing working Ok, but every time when I click on “Save button” I got a message
So if I click any of these button, my lookup table record hasn’t update, and if I click on close, its update the lookup table.
How I can remove the “Write Conflict” error, and update record in lookup table
I have past the code here.
I have got a error message in access 2003. I have 2 forms where (in one form user input the data and its store into a table)
So when user clicks the save button it’s save record in table and update a lookup table. And same time it open a 2nd form and shows the last record in the table.
Every thing working Ok, but every time when I click on “Save button” I got a message
“Write Conflict”
This record has been changed by another user since you started editing it. If you save 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.
Then three button on
Save Record --------- Copy to Clipboard----------- Don’t Save record
So if I click any of these button, my lookup table record hasn’t update, and if I click on close, its update the lookup table.
How I can remove the “Write Conflict” error, and update record in lookup table
I have past the code here.
Code:
[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Private Sub cmdsave_Click()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Dim stDocName As String
Dim stLinkCriteria As String
Dim it As String[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE LegLook SET LegLook.FRefNo = CSTR(CINT(LegLook.FRefNo) + 1) WHERE (((LegLook.Ftype)= " & [Forms]![LegFile].[Combo8] & "));"
DoCmd.RunSQL "Insert into LegFile (RefNo, FName, Description, OPDate, FHolder, OCNo, OCDate, DeedNo, BoxNo)" _
& "Values ('" & Forms!LegFile.Combo8 & "0" & Forms!LegFile.frmRefNo & "', '" & Forms!LegFile.frmName & "'," _
& " '" & Forms!LegFile.frmDescription & "', '" & Forms!LegFile.frmodate & "', '" & Forms!LegFile.frmfholder & "'," _
& "'" & Forms!LegFile.frmOCNo & "', '" & Forms!LegFile.frmOCDate & "', '" & Forms!LegFile.frmDeedno & "', '" & Forms!LegFile.frmBoxNo & "');"
DoCmd.SetWarnings True
it = "" & [Forms]![LegFile].[Combo8] & 0 & [Forms]![LegFile].[frmRefNo]
stDocName = "Legal Files"
stLinkCriteria = "[RefNo]=" & "'" & it & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "LegFile"
End Sub[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]