• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 796
  • Last Modified:

MDE Outputto error

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
deedub84
Asked:
deedub84
  • 4
  • 4
1 Solution
 
Rey Obrero (Capricorn1)Commented:
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
 
deedub84Author Commented:
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
 
Rey Obrero (Capricorn1)Commented:
( If the user initiates the save process ) where is this done?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
deedub84Author Commented:
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
 
deedub84Author Commented:
I'm relatively new to MDE files.... I'd welcome comments about what problems / issues / design approaches are required.

0
 
Rey Obrero (Capricorn1)Commented:


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
 
deedub84Author Commented:
Hmm... the MDE is still bombing out with a fatal error.  Although not with the MDB
0
 
Rey Obrero (Capricorn1)Commented:
before you create an mde make sure that the mdb compiles without error

DEBUG>Compile
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now