Solved: Access 2003: Form design and report preview

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

hmorales

Thread Starter
Joined
Feb 6, 2006
Messages
36
I have a form that on the click of a button opens a report and keep doing some background work.

When the report previews, the form seems to go automatically on design view, so the operations to be performed on the background stop, and a message appears, indicating that nothing can be done, because the form is on design view.

If I send the report straight to the printer (normal view) then all works fine, but if there is an error on the report, there is no way to catch it until after it prints.

Is there a way to keep the report on preview and the form on form view, so everything wil work smooth as it should?

I do greatly appreciate your answers.
 

Anne Troy

Anne
Joined
Feb 14, 1999
Messages
11,746
It sounds to me as if you are going into design view of the form instead of preview. See... the buttons to toggle to form view from design view is very similar to the button for PRINT preview. Make sure you're not hitting the wrong button. Print preview is a few buttons in from the left, while design/form view toggle is the first button on the left.
 

hmorales

Thread Starter
Joined
Feb 6, 2006
Messages
36
Anne,

This is the situation: the form has a button to preview the report. When the preview pops on the screen, it seems like the form automatically goes into design view, without any user manipulation.

I think this is due to the fact that if the report goes alive, then the form takes a second role and hides on design view in the background.

Instead, I setup the report to view normal, which is sending straight to the printer, and the form executes all the proper commands.
 
Joined
Aug 5, 2005
Messages
3,086
There's something going on in that button's Click event handler. Could you post that code?

chris.
 

hmorales

Thread Starter
Joined
Feb 6, 2006
Messages
36
I found an answer in an Access/VBA book.

The form that has the button and generates the preview looses the focus when the preview pops, and the control of the preview window is beyond the scope of Access.

So when the form looses focus, it gets into design view.

The same solution we took yesterday we'll be the permenent one. Let the report go straight to the printer (which was the option initially) and then the form won't lose focus and will execute the commands without a problem.

Thank you to everyone who tried to help me, and I hope this will help some other developers.
 
Joined
Aug 5, 2005
Messages
3,086
Well, there's something crazy going on, because a form shouldn't enter Design View just because it loses focus.

Anyway, if you're happy with what you have, you can mark this thread "Solved" using the Thread Tools at the top of the page.

chris.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top