473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

runtime error 2497..action method requires a report name

I dont get it lately the code is working andnow i get the error message...the code below is on a list where i can select the reports from a table source and enables user to preview and export it..any help pls...tnx


Private Sub lstReports_AfterUpdate()
Me.RecordsetClone.FindFirst "[report code] = " & Me![lstReports]
Set rs = db.OpenRecordset("reports", dbOpenDynaset)
'Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Private Sub previewreport_Click()
stdoc = Me.Report_file_name
DoCmd.OpenReport stdoc, acViewPreview
End Sub

Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
stdoc = Me.Report_file_name
DoCmd.OutputTo acOutputReport, stdoc, xls
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox Err.Description
Resume Exit_Command11_Click
End Sub
Jun 21 '07 #1
1 4262
puppydogbuddy
1,923 Expert 1GB
I dont get it lately the code is working andnow i get the error message...the code below is on a list where i can select the reports from a table source and enables user to preview and export it..any help pls...tnx


Private Sub lstReports_AfterUpdate()
Me.RecordsetClone.FindFirst "[report code] = " & Me![lstReports]
Set rs = db.OpenRecordset("reports", dbOpenDynaset)
'Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Private Sub previewreport_Click()
stdoc = Me.Report_file_name
DoCmd.OpenReport stdoc, acViewPreview
End Sub

Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
stdoc = Me.Report_file_name
DoCmd.OutputTo acOutputReport, stdoc, xls
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox Err.Description
Resume Exit_Command11_Click
End Sub

I believe your problem is with Me.Report_file_name. I think your reference is wrong.

stdoc = Me!lstReports!Report_file_name
Jun 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
by: Alex Wisnoski | last post by:
I am trying to adapt Lebans' ReportUtilities to export reports (to preserve formatting) from an Access 97 application. I have made the reference to his mde and copied the modules into my db. I...
13
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: zfraile | last post by:
I'm getting this error from the JIT compiler at runtime, but only on my boss' machine, not my development machine. I believe the error is generated from a call to an Excel object, but I can't tell...
0
by: Acrobat error in RS2000 and ASP2.0/2005 | last post by:
Hello, I am registering a client script that is a succession of strings appended. When I run the program, the script should open adobe acrobat with a .pdf file I generated. But the script opens...
3
by: dancer | last post by:
I am using Framework 1.1.4322. Who can tell me why I'm getting this error? My code follows Compilation Error Description: An error occurred during the compilation of a resource required to...
1
by: chienee | last post by:
here is the code <?php session_cache_limiter('private,must-revalidate'); session_start(); require_once("config.php"); include ("classes/db_functions.php"); include ("classes/display.php");
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.