Solved

Access 2010 ACCDE - Odd issue with Print Preview and runtime

Posted on 2015-01-02
4
608 Views
Last Modified: 2016-02-10
Hello All

I have what I think is an odd issue.  I have an access 2010 program where the backend is on an Azure server with SQL and the front end is an accde on each person's machine.  Many of these people only have Access 2010 runtime.

I was running into all sorts of issues with printing from print preview.  Sometimes it would print, sometimes not (Ctrl+P would not even work), sometimes you could right click (I have a custom menu that would pop up) and the menu would appear sometimes not.

So I decided to change the pop up property to each report to No.  This is working because the print preview ribbon appears.  But here is the issue:

When a user clicks on a report and presses the command button I made in the program the entire program minimizes to the toolbar.  Then if you click on the minimized program the print preview window will open up but it opens in either an extremely tiny window or a middle sized window.  Then the user maximizes the print preview window so it takes up the whole screen.  What is odder still is that as long as they do not log out of my program, from this point forward if they ever print preview a report again it does open maximized.  So it seems they only have to do the maximizing on the first time.

Does anyone know why and if there is any vba code I can put in to stop this?

Thank you all and Happy New Year!
0
Comment
Question by:alevin16
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40528972
You can use this code to maximize a Form or Report:

DoCmd.Maximize

You'd run this in the Open event, most likely.

However, the behavior you report often indicates troubles with a database (i.e. corruption). To resolve that, first make a backup, then do this:

1. Compact the database
2. Compile the VBA Code. Open the VBA Editor, click Debug - Compile, and fix any errors you run across. Continue doing this until the Compile menu item is disabled
3. Compact again.

You may also need to Decompile. To do this, create a shortcut with a Target like this:

"full path to msaccess.exe" "full path to your db" /decompile

Run this, then run the 3 steps above again

You may also need to create a new, blank database and import everything into that new db. Use the standard Access Import ribbon methods for this.

Finally, be sure all machines are fully updated in regard to Windows and Office.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40532380
When a user clicks on a report and presses the command button I made in the program the entire program minimizes to the toolbar.  
Can you explain very clearly how you are doing this and for what reason?
Keep it simple at first.
Did this system ever work correctly?
Does this all work without this "minimizing" code?

Is this an issue on all machines or just the Full Access users or just the runtime users?
Is this for all reports?
Could the same user print the report, ...then have it fail if they tried to immediately view it again...
Is this only for printing, ...or Print Previewing?

JeffCoachman
0
 

Author Comment

by:alevin16
ID: 40532393
Hi Jeff,

I have to run to a meeting, but I am going to find out if it is just runtime machines or all of them.  Right now it looks like all because I just ran it on my machine and it did the minimizing thing.

Hopefully I can get some more answers later.
Thanks again! (you seem to get me out of A LOT of sticky problems...I really appreciate your help!)
Andy
0
 

Author Closing Comment

by:alevin16
ID: 40624534
SOrry for the neglect here with my stuff recently.  I have gone thru a lot (losing a job was the worst). Here is what I did, with help from my Canadian source.  I put this in the print preview button on the form

        Forms("MainForm2").Visible = False
        Me.TimerInterval = 100

Then  in the timer property I put
          Dim objReports As AccessObject
          Dim objReport As AccessObject

10        For Each objReport In Application.CurrentProject.AllReports
20            If objReport.IsLoaded = True Then
30                Exit Sub
40            End If
50        Next

60        Me.TimerInterval = 0
70        Forms("MainForm2").Visible = True

It brings the report up in a preview screen.  Not the best solution but with losing that job I have no time to make a custom ribbon (wish I did, it seems pretty cool)
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question