473,394 Members | 1,746 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.

How can I make a report open in Report view?

204 128KB
My reports always open in Print Preview, even though the DefaultView property is set to Report view.
I don't think this was always the case. When I was developing them they opened in Report view. Then I moved on to other parts of the development and now I find the reports always open in print preview, and I don't know how or when they changed.

I can't find anything in Access Options which might control this. I tried setting DefaultView=1 in an Open Event Procedure, but it just gave me a run-time message telling me to set the default view in Design view - which I had already done.

For at least one report it is important that it be opened in Report View because I have an OnPage procedure which should only be run when the final report is printed, not when it is merely viewed. (OnPage fires when Print Preview is opened. I can't find an event which only fires when the page is actually printed.)
Jan 7 '17 #1
3 1095
PhilOfWalton
1,430 Expert 1GB
Very odd. I assume you are opening the report by double clicking the report in the NavPane (bad practice - you should have a proper menu / switchboard).

Anyway Setting the Default View with the form in Design View works for me.

So maybe we should suspect corruption.
1) Does this happen with all reports?
2) Does the report open correctly by right clicking and choosing the appropriate option?
3) Have you tried compacting & repairing?
4) Have you tried creating a new report?
5) Have you tried creating a new database & importing everything into it (other than the suspect report)? But see question 1 first.

Phil
Jan 7 '17 #2
Petrol
204 128KB
Ah, Phil to the rescue once again! Happy New Year, Phil.

No, I'm opening the report from a switchboard. (In fact, I now suspect that's the problem - see below).

1) Yes, all reports
2) Yes, it opens in report view from the Nav pane default "Open" option
3) Yes, many times
4) Yes, same thing happens. It can be opened correctly from Nav pane in any of the 3 views, but only in Print Preview from the switchboard.
5) No, I haven't tried creating a new database and importing everything else into it. (There are well over 100 objects in the DB!)

I suspect that the problem lies in the way Switchboard opens the report. For Forms, in Switchboard Manager you have the option to open them in Add mode or Edit mode, but for Reports you don't get an option. It's just "Open Report".

Switchboard seems to be a rather curious beast, with convoluted recursive macro calls, but when I look into it in design mode (OptionLabel1 OnClick Embedded macro), "If [Command]=4" calls the OpenReport macro allegedly with view "Report". When I hover over the macro, however, a comment window pops up saying "Opens a report in Design View or Print Preview or prints a report immediately". I don't know how they do this, because as I said the macro appears to try to open the report in Report view. But the main issue is, I wonder if there's anything I can do about it (short of telling my users to forget the switchboard and open from the Nav pane :( !)
Jan 7 '17 #3
PhilOfWalton
1,430 Expert 1GB
Happy New year Peter.

AFIK that is a limitation of the built in Switchboard. It could be modified, but I think that would be quite a job.

I use a rather complex tree type menu for nearly all my programs



But if you google there appear to be other switchboards out there.

Phil
Jan 7 '17 #4

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

Similar topics

5
by: ScottyBaby | last post by:
Hi, I've run into a curious problem with MS SQL Server 8.0. Using sp_help and SQL Query Analyzer's object browser to view the columns returned by a view, I find that sp_help is reporting stale...
2
by: Dan Williams | last post by:
We have a bookings table that records various information and for each booking we record various events that users have performed on that booking along with when the event occurred. For...
14
by: Scott Gorman | last post by:
I have a report with a sub report for an income / expense report for church. My expense report is the sub report. My question is, when I run the report, it prompts me 2-3 times for the parameters...
6
by: icony | last post by:
Hi everyone, Here's my problem. I have a report that i want to use with the command openreport. The report open and close in a fraction of a second. I cant see why i cant view the thing. Cause i...
12
by: Orchid | last post by:
Hello all, I have different version of reports which used for different months. For example, I am using report version 1 up to September, but we have some design changes on the report for October,...
5
by: Piedone | last post by:
Hi! I have experienced a a really odd problem when writing an Access application. I would programatically open a report (because i need to pass a value to it) with DoCmd.OpenReport. I would like...
7
by: martin DH | last post by:
Hello, I have a report that I open that pull its data from a form that builds a where string. Opening the report first opens the form, where I enter criteria, and then pulls matching records from a...
4
by: Phil Stanton | last post by:
I am opening a report (in Preview) from a menu system I use the following code if there is no data in a report Private Sub Report_NoData(Cancel As Integer) MsgBox "There are no errors in...
5
by: edme | last post by:
Hello I got a report with a long list of rows in it, my problem is that I can see the header/title of each field only when I see the first rows after I start scrolling I can't see the...
8
by: trivanka | last post by:
How to open report directly in Access 2010 when we open the file? Under options - Current Database, I see Display Form. Do I need to write a VBA code for this and if so, which event. I also...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.