By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,978 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,978 IT Pros & Developers. It's quick & easy.

Verify after report Preview

P: n/a
I have a report that is opened in preview mode, the users can view it then
send it to a printer. I want to; in the same command display a dialog box
with "Yes/No" to confirm the next step. How do I pause the code until the
report is closed? If I display the message after the report preview, the box
is opened over the report and the users cannot work with the report.
Jul 9 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Open the report with acDialog which stops the code in your form and remove
the ability to print from the preview. Then use the MsgBox as the next line
of code after the OpenReport and key your printing off of the answer.

paii, Ron wrote:
>I have a report that is opened in preview mode, the users can view it then
send it to a printer. I want to; in the same command display a dialog box
with "Yes/No" to confirm the next step. How do I pause the code until the
report is closed? If I display the message after the report preview, the box
is opened over the report and the users cannot work with the report.
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 9 '07 #2

P: n/a
Sorry, I should have included it was Access 97. It's OpenReport does not
support acDialog.

"ruralguy via AccessMonster.com" <u12102@uwewrote in message
news:74ef944b30e63@uwe...
Open the report with acDialog which stops the code in your form and remove
the ability to print from the preview. Then use the MsgBox as the next
line
of code after the OpenReport and key your printing off of the answer.

paii, Ron wrote:
I have a report that is opened in preview mode, the users can view it
then
send it to a printer. I want to; in the same command display a dialog box
with "Yes/No" to confirm the next step. How do I pause the code until the
report is closed? If I display the message after the report preview, the
box
is opened over the report and the users cannot work with the report.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 10 '07 #3

P: n/a
Oops! Can you loop on DoEvents while checking the Reports collection until
your report is no longer there? I know nothing about a97, sorry. Maybe
someone with a97 will drop by with a suggestion.

paii, Ron wrote:
>Sorry, I should have included it was Access 97. It's OpenReport does not
support acDialog.
>Open the report with acDialog which stops the code in your form and remove
the ability to print from the preview. Then use the MsgBox as the next line
[quoted text clipped - 5 lines]
>report is closed? If I display the message after the report preview, the box
is opened over the report and the users cannot work with the report.
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Jul 10 '07 #4

P: n/a
I thought of that, but it can really tie-up the computer, especially when
using terminal server.

Thanks for your input anyway.

"ruralguy via AccessMonster.com" <u12102@uwewrote in message
news:74f7eddb39120@uwe...
Oops! Can you loop on DoEvents while checking the Reports collection
until
your report is no longer there? I know nothing about a97, sorry. Maybe
someone with a97 will drop by with a suggestion.

paii, Ron wrote:
Sorry, I should have included it was Access 97. It's OpenReport does not
support acDialog.
Open the report with acDialog which stops the code in your form and
remove
the ability to print from the preview. Then use the MsgBox as the next
line
[quoted text clipped - 5 lines]
report is closed? If I display the message after the report preview,
the box
is opened over the report and the users cannot work with the report.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Jul 10 '07 #5

P: n/a
paii, Ron wrote:
I thought of that, but it can really tie-up the computer, especially when
using terminal server.

Thanks for your input anyway.
Is it possible to call the code from the Report's OnClose event? Either
that, could you create a Public function/sub in the CallingForm you can
call in the OnClose or some other event in the Report?
>
"ruralguy via AccessMonster.com" <u12102@uwewrote in message
news:74f7eddb39120@uwe...
>>Oops! Can you loop on DoEvents while checking the Reports collection

until
>>your report is no longer there? I know nothing about a97, sorry. Maybe
someone with a97 will drop by with a suggestion.

paii, Ron wrote:
>>>Sorry, I should have included it was Access 97. It's OpenReport does not
support acDialog.
Open the report with acDialog which stops the code in your form and

remove
>>>>the ability to print from the preview. Then use the MsgBox as the next

line
>>>[quoted text clipped - 5 lines]

>report is closed? If I display the message after the report preview,

the box
>>>>>is opened over the report and the users cannot work with the report.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com


Jul 10 '07 #6

P: n/a
Paste this function into a standard module:

Public Function ReportIsClosed(ByVal ReportName As String) As Boolean
ReportIsClosed = (SysCmd(acSysCmdGetObjectState, acReport, ReportName) =
0)
End Function

Then, after opening your report, do something like:

Do
DoEvents
Loop Until ReportIsClosed("MyReport")

"paii, Ron" <pa**@pack.comwrote in message
news:8p******************************@athenet.net. ..
>I have a report that is opened in preview mode, the users can view it then
send it to a printer. I want to; in the same command display a dialog box
with "Yes/No" to confirm the next step. How do I pause the code until the
report is closed? If I display the message after the report preview, the
box
is opened over the report and the users cannot work with the report.


Jul 10 '07 #7

P: n/a
"paii, Ron" <pa**@pack.comwrote in
news:8p******************************@athenet.net:
I have a report that is opened in preview mode, the users can
view it then send it to a printer. I want to; in the same
command display a dialog box with "Yes/No" to confirm the next
step. How do I pause the code until the report is closed? If I
display the message after the report preview, the box is
opened over the report and the users cannot work with the
report.
I create a toolbar that hovers over the print preview. I contains a
printer icon, to send the report there, and Icons to Export to
Excel, Word or Text. There's also a button with "Close" on it, and
a zoom box. You can force it to be a menu bar instead.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 11 '07 #8

P: n/a
Thank you, that works. rurlguy suggested something along the same lines, I
am worried about any hit on the processor in a terminal server environment
with the constant looping. Some testing may be required.

"UrbanSpaceman" <sm*****@myunrealbox.comwrote in message
news:f7*******************@news.demon.co.uk...
Paste this function into a standard module:

Public Function ReportIsClosed(ByVal ReportName As String) As Boolean
ReportIsClosed = (SysCmd(acSysCmdGetObjectState, acReport, ReportName)
=
0)
End Function

Then, after opening your report, do something like:

Do
DoEvents
Loop Until ReportIsClosed("MyReport")

"paii, Ron" <pa**@pack.comwrote in message
news:8p******************************@athenet.net. ..
I have a report that is opened in preview mode, the users can view it
then
send it to a printer. I want to; in the same command display a dialog
box
with "Yes/No" to confirm the next step. How do I pause the code until
the
report is closed? If I display the message after the report preview, the
box
is opened over the report and the users cannot work with the report.


Jul 11 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.