Solved

MDE Outputto error

Posted on 2008-10-08
8
785 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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
ID: 22668844
( If the user initiates the save process ) where is this done?
0
 
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
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: 22669290
I'm relatively new to MDE files.... I'd welcome comments about what problems / issues / design approaches are required.

0
 
LVL 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

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

DEBUG>Compile
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now