John Tompa
New member
- Local time
- Today, 01:03
- Joined
- Mar 14, 2008
- Messages
- 9
I am running Access 2000.
I have a form which has an beforeupdate event to set a time stamp:
I also have a combo box with a goto a record using the recordsetclone & bookmark.
If I change anything in the displayed record, the GoTo combo box errors with the message "Update or CancelUpdate without AddNew or Edit". Andwering OK makes me stay at the same record. I have to press escape to be able to continue.
However by moving to a new record by the navigation buttons, there is no error & the new record is gone to.
Here is the code:
for the combobox "AllerNom":
Private Sub AllerNom_AfterUpdate()
With Me.RecordsetClone
.MoveLast
.FindFirst "[ID] = " & Me![AllerNom]
Me.Bookmark = .Bookmark
End With
End Sub
For the form beforeupdate
Private Sub Form_BeforeUpdate(Cancel As Integer)
MiseAJourGenerale
End Sub
and the sub MiseAJourGenerale
Private Sub MiseAJourGenerale()
Me.MaJ = Now()
End Sub
On answering debig the code Me.MaJ = Now() is highlighted.
Any ideas?
Thank you
John Tompa
I have a form which has an beforeupdate event to set a time stamp:
I also have a combo box with a goto a record using the recordsetclone & bookmark.
If I change anything in the displayed record, the GoTo combo box errors with the message "Update or CancelUpdate without AddNew or Edit". Andwering OK makes me stay at the same record. I have to press escape to be able to continue.
However by moving to a new record by the navigation buttons, there is no error & the new record is gone to.
Here is the code:
for the combobox "AllerNom":
Private Sub AllerNom_AfterUpdate()
With Me.RecordsetClone
.MoveLast
.FindFirst "[ID] = " & Me![AllerNom]
Me.Bookmark = .Bookmark
End With
End Sub
For the form beforeupdate
Private Sub Form_BeforeUpdate(Cancel As Integer)
MiseAJourGenerale
End Sub
and the sub MiseAJourGenerale
Private Sub MiseAJourGenerale()
Me.MaJ = Now()
End Sub
On answering debig the code Me.MaJ = Now() is highlighted.
Any ideas?
Thank you
John Tompa