473,394 Members | 1,843 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,394 software developers and data experts.

Docmd.OpenReport - slow opening a report.

Hi All:

I am using Access2000 and I find that the command to open an Access report
in preview mode is very slow: DoCmd.OpenReport rptABC, acViewPreview, "",
""

The scenario is this:
- The following codes are written in the VB Applcation.
- Prior to opening the report, I set its recordsource with a sql:
..Reports!rptABC.RecordSource = sSql. The sSql searches for a specific
LastName: "Select * from tblABC where LastName >= "Smith" and LastName <=
"Smith".
- Table "tblABC" which the report is based on has 2655 records.
- Then I issue the DoCmd.OpenReport command.
- The problem is that it takes a long long time ( ie 5 minutes ) for the
report to come up in preview mode.

Can somebody please tell me what I need to do to improve the situation? Is
there a problem with Access's DoCmd.OpenReport command? Is there another
way to open up the report in preview mode?
Any help is much appreciated.

Andrew
Nov 12 '05 #1
1 3813
Andrew wrote:
Hi All:

I am using Access2000 and I find that the command to open an Access report
in preview mode is very slow: DoCmd.OpenReport rptABC, acViewPreview, "",
""

The scenario is this:
- The following codes are written in the VB Applcation.
- Prior to opening the report, I set its recordsource with a sql:
.Reports!rptABC.RecordSource = sSql. The sSql searches for a specific
LastName: "Select * from tblABC where LastName >= "Smith" and LastName <=
"Smith".
- Table "tblABC" which the report is based on has 2655 records.
- Then I issue the DoCmd.OpenReport command.
- The problem is that it takes a long long time ( ie 5 minutes ) for the
report to come up in preview mode.

Can somebody please tell me what I need to do to improve the situation? Is
there a problem with Access's DoCmd.OpenReport command? Is there another
way to open up the report in preview mode?

Any help is much appreciated.

Andrew


Why don't you set the recordsource in the OnOpen event of the report.
strSQL = "Select * From Table1...."
Me.Recordsource = strSQL

If you are looking for smith, why not do this
Docmd.OpenReport "YourReportName",acViewPreview,,"LastName = 'Smith'"

5 minutes to display is about 4 minutes, 59 seconds too much

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jonathan Goldman | last post by:
Hi- I have a relatively simple report that I open in an Access '97 VBA procedure, using the Docmd.OpenReport "rptName", acViewNormal syntax. The problem is that doing this usually crashes...
1
by: Filips Benoit | last post by:
Dear All, DoCmd.OpenReport RPT_TEST, A_PREVIEW, QueryAsFilter doesn't work correctly in A97 but works OK in A2K. Is this a bug for A97 ? Filip
3
by: Blah | last post by:
Hello, I'm trying to use the where clause in OpenReport to limit the data return on the subreport. Is there a way to do it using that method or OpenReport only work with the report you're...
1
by: JohnM | last post by:
I don't seem to be able to get opening a report and sortin the rcords right. I an open the report, limited to a range of my choosing. So, for example the code below opens my report and limits it...
2
by: Smartin | last post by:
Question about DoCmd.PrintOut in A97. I have a form on which all the controls are unbound. There is a large textbox that the user can type stuff in and a couple labels. I am trying to code a...
3
by: news.onet.pl | last post by:
Hello! I have a question concerning to open the reports. I know that DoCmd.OpenReport is a obsolete form of opening the reports, but how to implement opening reports in VB using another VB code?...
4
by: Simon | last post by:
Dear reader, The syntax for Docmd.OpenReport is: OpenReport(ReportName, View, FilterName, WhereCondition, WindowMode, OpenArgs) Example The following example prints Sales Report while...
4
by: robtyketto | last post by:
Greetings, I originally used a button on a from created via the button wizard (access 2007) to run my report which was based on a query. Since I wanted to add some validation I removed the...
4
by: gazza10001 | last post by:
Hi i hope you can help my company uses access and has modified for its needs usually what happens is you serach for the invoice by its number and then it brings all the information up such as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.