jaluv
Programmer
- Jun 10, 2008
- 1
In Access 2007, I get the "Update or CancelUpdate without AddNew or Edit" error. After googling around, I can't find any solution - everything I've found online so far has pointed to editing Recordsets, but I don't edit any recordsets in my code.
Here's some details...
I have a TextBox called guestID (PK) in a form. As a feature, I'm allowing the user to enter a guestID and immediately go to that record. This works fine on the first try (going from a blank record to an existing record), however, I get the error afterwards. The error pops up when the user edits the current record and tries to remove focus (tab out for example) from the edited field. The error pops up before any event is triggered (I've put a MsgBox in nearly every Form and TextBox event, none of them pop up before the error).
In trying to fix this, I've removed all but one recordset from my code. And I've put the following code all over the place...
If Me.Dirty Then
Me.Dirty = False
End If
...neither idea helped.
Does anyone have any advice? This is killing me.
Here's some details...
I have a TextBox called guestID (PK) in a form. As a feature, I'm allowing the user to enter a guestID and immediately go to that record. This works fine on the first try (going from a blank record to an existing record), however, I get the error afterwards. The error pops up when the user edits the current record and tries to remove focus (tab out for example) from the edited field. The error pops up before any event is triggered (I've put a MsgBox in nearly every Form and TextBox event, none of them pop up before the error).
In trying to fix this, I've removed all but one recordset from my code. And I've put the following code all over the place...
If Me.Dirty Then
Me.Dirty = False
End If
...neither idea helped.
Does anyone have any advice? This is killing me.