Solved

MDE Outputto error

Posted on 2008-10-08
8
784 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

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…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

744 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

12 Experts available now in Live!

Get 1:1 Help Now