Jumat, 13 September 2013

[MS_AccessPros] RE: Error message "Unable to open any more Databases"

 

Bill, after trying the macro as you suggested everything worked great.  When I went to convert the macro to a procedure  as follows (I get one of two errors):


 Private Sub Report_Close()
   On Error GoTo Report_Close_Err
      DoCmd.Close acReport, "Rpt_Composite", acSaveNo
      DoCmd.OpenForm "frmRptSysDialog", acNormal, "", "", , acNormal
  Report_Close_Exit:
      Exit Sub
  Report_Close_Err:
      MsgBox Error$
      Resume Report_Close_Exit
End Sub


With acSaveNo on the Close command error "The Close action was canceled"

Without acSaveNo the error is "No current record"


Did I miss something in converting the macro?

Rod



--- In ms_access_professionals@yahoogroups.com, <wrmosca@...> wrote:

Rod

 

Glad I could hale. I don't think I've used more than 2 or 3 macros in my entire career. If you are comfortable with converting it to code I'd say go ahead.

 

Regards,

Bill

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of desertscroller@...
Sent: Wednesday, September 11, 2013 7:05 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] RE: Error message &quot;Unable to open any more Databases&quot;

 

 

Thanks Bill, that did the trick.  I was thinking of converting macro to procedure to handle errors better.

 

Rod



--- In ms_access_professionals@yahoogroups.com, <wrmosca@...> wrote:

Rod

 

In your macro, did you specify the report by name.  If the report loses focus the macro won't close it.

 

Regards,

Bill Mosca, Founder - MS_Access_Professionals

http://www.thatlldoit.com

Microsoft Office Access MVP

https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E

My nothing-to-do-with-Access blog

http://wrmosca.wordpress.com

 



--- In MS_Access_Professionals@yahoogroups.com, <ms_access_professionals@yahoogroups.com> wrote:

Thanks Clive, I am working on trying the two suggestions.  I will be looking at Bill's utility very closely, it may provide the best solution.  If you don't mind I have one other question.  When the report is run with one company the results look correct but when I try to close it, I get a Macro Single Step popup.  The Action being taken is CloseWindow with error number 3021.  The Stop All Macros is active and when selected the report closes.  In the Macro, I have CloseWIndow, OpenForm and StopMacro statements.  Any suggestions?

Rod

 


--- In ms_access_professionals@yahoogroups.com, <zctek@...> wrote:

Hi Rod,

You can also download a utility from Bill Mosca's website,
that You can use it to remove some redundant indexes.
http://www.thatlldoit.com/Pages/codesamples.aspx

It is called TurnOffSubDataSheets and it changes the
tables Subdatasheet_Name property from [auto] to [none]
and it tells you how many tables have been modified.

You only need to run it once for existing tables or
if you add new tables.

Hope that helps.

Regards, Clive.

--- In MS_Access_Professionals@yahoogroups.com, "Clive" <zctek@...> wrote:
>
> Hi Rod,
>
> The message "Unable to open any more Databases" really means
> "Too many Indexes in use".
>
> You can remove unnecessary indexes in the Tables used but
> if that fails then use your suggestion and create
> Temporary Tables for intermediate results.
>
> Regards, Clive.
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar