Solved

MDE Outputto error

Posted on 2008-10-08
8
790 Views
Last Modified: 2012-08-13
Hi Experts,

I have created an MDE from a FE/BE split database.

On a form, I have an option to save a report (in smp format), email it, and preview/print it.  If the user initiates the save process (which opens up a standard save dialog box and then escapes out (or x's out), the attached error message is displayed.

Is there a way to avoid this error message (which I think would be confusing and counterintuitive to the user?

Thx,

Deedub84
Error.bmp
0
Comment
Question by:deedub84
  • 4
  • 4
8 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22668509
you have to get the .mdb version of the FE and fix it there.
add codes to the save process to trap any cancellation which will cause the filename to be equal to ""

then create another .mde and replace the old ones
0
 
LVL 1

Author Comment

by:deedub84
ID: 22668803
Thks Cap,  I have the mdb, so that's not a problem, I guess my question really is what is that error trapping, I'm not clear.

My code is bare, bare bones; see below.

Any suggestions would be great!
Private Sub btnPrintReport_Click()
 
DoCmd.OutputTo acOutputReport, "rptSummary", acFormatSNP
 
End Sub

Open in new window

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22668844
( If the user initiates the save process ) where is this done?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 1

Author Comment

by:deedub84
ID: 22669192
On a button on a form; the code for which is attached above.

In the mdb, when I cancel out of the save, I get an error 2501 "Output to action canceled".

I added "On error resume next" in the PrintReport_Click procedure; in the MDB it avoided the error message.

In the MDE though, it produced a fatal error!!  
Fatal-error.bmp
0
 
LVL 1

Author Comment

by:deedub84
ID: 22669290
I'm relatively new to MDE files.... I'd welcome comments about what problems / issues / design approaches are required.

0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 22669307


create an error trapping routine



Private Sub btnPrintReport_Click()
on error goto savecancelerr
DoCmd.OutputTo acOutputReport, "rptSummary", acFormatSNP
 
savecancelerr:
   if err.number=2501 then
      err.clear
      resume next
   end if
 
End Sub

Open in new window

0
 
LVL 1

Author Comment

by:deedub84
ID: 22669747
Hmm... the MDE is still bombing out with a fatal error.  Although not with the MDB
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22669782
before you create an mde make sure that the mdb compiles without error

DEBUG>Compile
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Date Diff Query in Access 2010 4 28
Dinamic report to Crosstab query 9 33
set focus to tabbed sub form 10 39
Access Web App or PowerApp 16 23
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question