Re: Closing Form Produces "Runtime Error 2585"
From: Graham Mandeno (Graham.Mandeno_at_nomail.please)
Date: 05/25/04
- Next message: Graham Mandeno: "Re: Open Application with window maximised"
- Previous message: Jonathan Parminter: "RE: combo box lookup"
- In reply to: Kevin Rodriguez: "Closing Form Produces "Runtime Error 2585""
- Next in thread: Kevin Rodriguez: "Re: Closing Form Produces "Runtime Error 2585""
- Reply: Kevin Rodriguez: "Re: Closing Form Produces "Runtime Error 2585""
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 10:23:42 +1200
Hi Kevin
DoCmd.Close can behave asynchronously and works on the form which currently
has the focus, so I suspect what is happening is that sometimes you are
attempting to close the MainMenu form while it is in the act of opening.
Always specify what you want to close:
DoCmd.Close acForm, Me.Name
I see you say you have already tried this, but try it again anyway :-)
My main concern is that you should NEVER store an easily calculatable entity
such as Full Name like this. It is so easy to make a query with a
calculated field to give you the Full Name from its component parts as and
when you need it, and in the format required for the purpose.
I recommend you remove the Full Name field from your table.
-- Good Luck! Graham Mandeno [Access MVP] Auckland, New Zealand "Kevin Rodriguez" <anonymous@discussions.microsoft.com> wrote in message news:93969617-8941-44D4-B222-D92C63D46BC8@microsoft.com... > 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...
- Next message: Graham Mandeno: "Re: Open Application with window maximised"
- Previous message: Jonathan Parminter: "RE: combo box lookup"
- In reply to: Kevin Rodriguez: "Closing Form Produces "Runtime Error 2585""
- Next in thread: Kevin Rodriguez: "Re: Closing Form Produces "Runtime Error 2585""
- Reply: Kevin Rodriguez: "Re: Closing Form Produces "Runtime Error 2585""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|