W
Willy
My form is bounded to a query
Even if on the form i'm positioned on the last recod
the bookmark always move me to the first record
=========================================
Private Sub edtCodice_BeforeUpdate(Cancel As Integer)
Dim fd As DAO.Field
Dim rst As DAO.Recordset
Dim bkmrkRecord As String
'
' when the event is fired on the form
' i'm positioned on the last record
'
bkmrkRecord = Me.RecordsetClone.Bookmark
Set rst = Me.RecordsetClone
rst.Bookmark = bkmrkRecord
Set fd = rst.Fields![Codice]
rst.Edit
'
' always the first record is edited
' and updated
'
fd.Value = LPad(Me!edtCodice.Text, "0", fd.Size)
rst.Update
End Sub
============================================
what i'm missing ?
Any help would be appreciate
TIA,
Stefano Campri
Even if on the form i'm positioned on the last recod
the bookmark always move me to the first record
=========================================
Private Sub edtCodice_BeforeUpdate(Cancel As Integer)
Dim fd As DAO.Field
Dim rst As DAO.Recordset
Dim bkmrkRecord As String
'
' when the event is fired on the form
' i'm positioned on the last record
'
bkmrkRecord = Me.RecordsetClone.Bookmark
Set rst = Me.RecordsetClone
rst.Bookmark = bkmrkRecord
Set fd = rst.Fields![Codice]
rst.Edit
'
' always the first record is edited
' and updated
'
fd.Value = LPad(Me!edtCodice.Text, "0", fd.Size)
rst.Update
End Sub
============================================
what i'm missing ?
Any help would be appreciate
TIA,
Stefano Campri