3 open fine, error on 4th

B

Bonnie A

Hello everyone! Using A02 on XP.

I have 4 reports that contain a series of screenprints providing examples of
how to complete certain forms. I want to open all 4 in preview with one
button click. I have this on my button:

Dim stDocName As String

stDocName = "rBlankFormViewPage1"
DoCmd.OpenReport stDocName, acPreview
stDocName = "rBlankFormViewPage2"
DoCmd.OpenReport stDocName, acPreview
stDocName = "rBlankFormViewPage3"
DoCmd.OpenReport stDocName, acPreview
stDocName = "rBlankFormViewPage4"
DoCmd.OpenReport stDocName, acPreview

When I click the button, the first 3 open but then I get a message saying
"You canceled the previous operation". No, I did not! I click OK and 1, 2
and 3 are open in preview. 4 is not. I've inserted little message boxes
between each so I have to click OK but still get the message.

I'll use 2 buttons to open 2 each for now but hope to find out what I'm
doing wrong. Thanks in advance for any help or advice!

Luv U Guys!
 
R

Roger Carlson

What happens when you open the 4th form manually? Do you get some kind of
error message? This can sometime translate into the "You canceled..." error
message.

Your form might also be corrupt. You might try Decompiling your
application. See this page for details:
http://www.rogersaccesslibrary.com/knowledge.html. Near the bottom of the
page there's a document called DecompilingDatabases that you can download.


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
J

J_Goddard via AccessMonster.com

Hi -

Is there any code in the On Open or the On No Data event procedures of the
4th report which might be canceling the operation?

John
 
K

Klatuu

The other posters are on the right track. Test the report by opening it from
the database window.
This error can be very misleading. It can happen when an incorrect object
name is passed to Jet. What happens is Jet can't determine what you want, so
it cancels the request. Access sees the message as the operation being
canceled. Be sure all your names in your report's record source are correct.
 
B

Bonnie A

Hi Roger!

Thank you, thank you, thank you. I apologize for making you remind me to
see if it is plugged in first! Yes, I had an error on my 4th one. I thought
surely I had opened it like 1, 2 and 3. Evidently not.

I really appreciate your time and hope my foolish question didn't frustrate
you.
--
Bonnie W. Anderson
Cincinnati, OH


Roger Carlson said:
What happens when you open the 4th form manually? Do you get some kind of
error message? This can sometime translate into the "You canceled..." error
message.

Your form might also be corrupt. You might try Decompiling your
application. See this page for details:
http://www.rogersaccesslibrary.com/knowledge.html. Near the bottom of the
page there's a document called DecompilingDatabases that you can download.


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
R

Roger Carlson

Ah, if I had the time to list all the foolish thing *I've* done...

Glad it worked out for you.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Bonnie A said:
Hi Roger!

Thank you, thank you, thank you. I apologize for making you remind me to
see if it is plugged in first! Yes, I had an error on my 4th one. I
thought
surely I had opened it like 1, 2 and 3. Evidently not.

I really appreciate your time and hope my foolish question didn't
frustrate
you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top