Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3952154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:49:00+00:00 2026-05-20T01:49:00+00:00

We have an MS Access 2007 database with a simple form displaying table data.

  • 0

We have an MS Access 2007 database with a simple form displaying table data. We use the Find dialog (click the binoculars on the Home ribbon) to locate records we want. This can cause an error under specific circumstances.

Steps to reproduce the problem:

  1. Open the form.
  2. Open the find dialog.
  3. Edit some field within the record.
    The record is now in update mode
    (you’ll see the pencil in row’s
    “gutter” area).
  4. Without saving the record, click on
    the ALREADY open Find dialog.
  5. Search for a record that can’t be
    found.
  6. Click on the form again. The record
    is still in edit mode (i.e. the
    pencil still shows). Attempt a save
    or edit some other field.
  7. This message box will display
    “Update or CancelUpdate without
    AddNew or Edit.” You can click OK or
    Help buttons.

Clicking the Help button shows:

You tried to call Update or CancelUpdate or attempted to update a Field
in a recordset without first calling AddNew or Edit. (Error 3020)

On a Microsoft Access database engine database, you called the Update or
CancelUpdate method but did not use the AddNew or Edit method before writing
data to a record.

On an ODBCDirect database, this error occurs when you attempt to write data
to a record without first calling AddNew or Edit.

We’ve reproduced this in a new database where there is no VBA code. So the problem is solely within MS Access, and you should be able to reproduce it easily.

If you save the record before doing the find, the problem doesn’t happen. Unfortunately, we have users doing a find while the record is still in edit mode.

We’ve tried setting up form-level, data-field-level, and Access application level events and error handling. Nothing can detect or catch this situation. There is no way within VBA to detect if the Find dialog is active.

Does anyone have any ideas for preventing the error or a way to save the record before the find occurs? Our best thought right now is to create an AutoHotkey or AutoIt script that waits for the Find dialog to have focus. We’ll then send a Ctrl+S to save the current record to force a save.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:49:01+00:00Added an answer on May 20, 2026 at 1:49 am

    The hack, work-around we came up with was to write an AutoIt script which can watch for when the Find dialog gains focus and save the record if it has changed.

    We didn’t want to distribute the script separately from the database, so the the script was added to a database table as a Blob. The database’s AutoExec macro runs some VBA code that pulls the script out of the Blob table and starts the script.

    When the script detects that the Find dialog has focus, the script runs a VBA macro in the database. The macro checks to see if the current record is dirty. If dirty, the macro forces a save. Also, the AutoIt script is stopped when the database is closed.

    This is all pretty awkward, but it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an access 2007 Database that outputs a report in excel format, the
Using MS Access 2007, I am creating a student management database. I have tables
I have a legacy MS Access 2007 table that contains 52 fields (1 field
I have got a table in MS Access 2007 with 4 fields. Labour Cost
I have a simple form showing products from my database. Each product has a
I have an Access 2007 database where I have two tables, exp_cash and exp_cheque.
If I have a Microsoft Access 2007 database on a network location, is there
I have a great report in an Access 2007 Database and would like to
We have an Access database migrated from Access 97 to Acces 2007 with some
I have a MS Access 2007 database and a WSS 3.0 site (neither of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.