![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi: In an ms-access form, I wrote some code on doublick of a listbox to process data, and then call a save subroutine to store updated fields to a table. It seems to save successfully when I open the table to check. However, when I single-click on the same list again right after it saved (or single-click on another listbox on the same page which queries from a totally different table), it produces a strange message: "The data has been changed. Another user edited theis record and saved the changes before you attempted to save your changes. Re-edit the record." Why is this? Thanks, Kenneth here is an excerpt from the save sub: Private Sub SaveContent (Num) Dim ad as ADODB.Recordset Dim ad = New ADODB.Recordset For I = 1 to Num Text = Text & TextVar (I) Next ad.Open "A1Database", CurrentProject.Connection, adOpenDynamic, adLockOptimistic ad.MoveFirst ad.Find "ID=" & ID ad!Name = Text ad.Update ad.Close End sub |
![]() |
| Thread Tools | |
| Display Modes | |
| |