Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2004, 08:48 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default OpenReport Action Cancelled errror in Access 2003

Hi, Just upgraded a database from XP to Access 2003.

It has a form with a button that calls some code to open a report. This worked fine in XP. However after the upgrade when a user clicks on the button, access now cancels the action. Help!

The code is below, not much is there? :-)

"OpenReport action cancelled"

Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click

    DoCmd.OpenReport "rptSupplierDetails", acPreview, , "[DetailsID]=" & Me!DetailsID

Exit_cmdPrint_Click:
    Exit Sub
Err_cmdPrint_Click:
    MsgBox Err.Description
    Resume Exit_cmdPrint_Click
End Sub
++++++++++

Cheers
John
 
Old August 20th, 2004, 09:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Usually vague errors like that means you misspelled something. Try using the intrinsic constant acViewPreview instead of acPreview. Perhaps that's giving you the error.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupt DB - You cancelled the previous operation timmaher Access 8 June 5th, 2008 05:12 AM
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
Click event being cancelled!? Abbas ASP.NET 2.0 Professional 3 July 16th, 2007 05:18 PM
errror connecting to database prrao C# 2005 1 June 25th, 2007 05:14 AM
ADP OpenReport() ginoitalo Access 8 November 29th, 2004 09:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.