Closing Form Produces "Runtime Error 2585"

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kevin Rodriguez (anonymous_at_discussions.microsoft.com)
Date: 05/25/04


Date: Tue, 25 May 2004 13:11:04 -0700

I have a procedure that runs on Click from a form. The code, in brief:

    DoCmd.RunSQL "UPDATE Contacts SET Contacts.[Full Name] = [LastName] & ', ' & [FirstName] & ' ' & [Title]"
    DoCmd.Close
    DoCmd.OpenForm "MainMenu"

I'm getting the above referenced error (error message: This action can't be carried out while processing a form or report event), but not all the time. I can't figure out what is going on to have the error come up randomly. I've tried to run it without the SQL statement before the close, it still fails. I've been explicit including "acForm, <FormName>" on the DoCmd, it still fails. I'm at a loss.

I'm a novice and wondering if I set one of my properties incorrectly, or what ever...