I've got a combo box on a form used to select a 'Partner' and jump to the correct record. When the record appears, the Partner name is displayed in a second combo box, along with all other details. The second combo box is bound to the field in the table.
The problem is that the following sequence of events causes error 3020 (Update or CancelUpdate without AddNew or Edit):
I can understand (in a hazy way!) why this error is being generated - I suppose it's because the user has tried to update a new record, but the update has not completed. How, and where, do I trap this error?
Just for information - this is a DB I'm testing and amending, although I didn't develop it. I'm trying to reproduce all possible errors that users might find.
The error is occurring in the following code in the AfterUpdate event of the combo:
Thanks for any help on this ... feeling a bit desperate at the moment!
The problem is that the following sequence of events causes error 3020 (Update or CancelUpdate without AddNew or Edit):
- Select a record in the top combo box (the unbound one)
- Change the bottom box to a new value
- Select a new record from the top combo box
I can understand (in a hazy way!) why this error is being generated - I suppose it's because the user has tried to update a new record, but the update has not completed. How, and where, do I trap this error?
Just for information - this is a DB I'm testing and amending, although I didn't develop it. I'm trying to reproduce all possible errors that users might find.
The error is occurring in the following code in the AfterUpdate event of the combo:
Code:
Set rs = Me.Recordset.Clone
rs.FindFirst "[fldPartnerID] = " & Str(Nz(Me![cboPartnerName], 0))
'Synchronise PartnerID And PartnerName
Me![cboPartnerID] = cboPartnerName
If Not rs.EOF Then
[COLOR="Red"]Me.Bookmark = rs.Bookmark[/COLOR]
End If
Thanks for any help on this ... feeling a bit desperate at the moment!