?
Solved

MDE Outputto error

Posted on 2008-10-08
8
Medium Priority
?
795 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

649 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