Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update or CancelUpdate without AddNew or Edit

Status
Not open for further replies.

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.
 
A control used as a navigation tool shouldn't be bound.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top