Hi Nadir,
The Msgbox is modal, the user must supply information or close the UserForm
before using any other part of the application.
You would need to create your own pop-up Form with the Yes and No buttons.
Regards,
Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<
http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <
http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."
This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| From: (e-mail address removed) (Nadir)
| Newsgroups: microsoft.public.access.reports
| Subject: Re: To open a specific report number by users input of the
report#.
| Date: 30 Mar 2004 07:59:21 -0800
| Organization:
http://groups.google.com
| Lines: 216
| Message-ID: <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
| NNTP-Posting-Host: 204.228.240.57
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1080662361 2114 127.0.0.1 (30 Mar 2004
15:59:21 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Tue, 30 Mar 2004 15:59:21 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news.glorb.com!postnews2.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.reports:134791
| X-Tomcat-NG: microsoft.public.access.reports
|
| Hi Eric,
| Thank you, I did the change it is better. Is there a way when it popup
| with the message box of "Do you want to print this - Yes/No" to be
| able to click on the form behind of the message box if I want to
| scroll down or navigate to the next page before I click on Yes or No.
|
| Thanks,
|
| Nadir
|
|
| (e-mail address removed) (Eric Butts [MSFT]) wrote in message
| > Hi,
| >
| > Not sure if you are aware or not but the PrintOut action prints the
active
| > object in the open database.
| >
| > Are you sure you don't want to use instead
| > DoCmd.OpenReport acPrintAll
| >
| > If for whatever reason you need to PrintOut then use the optional
arguments
| > "PageFrom" and "PageTo", example:
| >
| > DoCmd.PrintOut acPages, 1, 4
| >
| > For details see the Microsoft Access help topic "PrintOut Method".
| >
| > Regards,
| >
| > Eric Butts
| > Microsoft Access Support
| > (e-mail address removed)
| > "Microsoft Security Announcement: Have you installed the patch for
| > Microsoft Security Bulletin MS03-026? If not Microsoft strongly
advises
| > you to review the information at the following link regarding Microsoft
| > Security Bulletin MS03-026
| > <
http://www.microsoft.com/security/security_bulletins/ms03-026.asp>
and/or
| > to visit Windows Update at <
http://windowsupdate.microsoft.com/> to
install
| > the patch. Running the SCAN program from the Windows Update site will
help
| > to insure you are current with all security patches, not just MS03-026."
| >
| > This posting is provided "AS IS" with no warranties, and confers no
rights
| >
| >
| >
| >
| >
| > --------------------
| > | From: (e-mail address removed) (Nadir)
| > | Newsgroups: microsoft.public.access.reports
| > | Subject: Re: To open a specific report number by users input of the
report#.
| > | Date: 25 Mar 2004 10:55:10 -0800
| > | Organization:
http://groups.google.com
| > | Lines: 133
| > | Message-ID: <
[email protected]>
| > | References: <
[email protected]>
<
[email protected]>
| > | NNTP-Posting-Host: 204.228.240.57
| > | Content-Type: text/plain; charset=ISO-8859-1
| > | Content-Transfer-Encoding: 8bit
| > | X-Trace: posting.google.com 1080240910 20081 127.0.0.1 (25 Mar 2004
18:55:10 GMT)
| > | X-Complaints-To: (e-mail address removed)
| > | NNTP-Posting-Date: Thu, 25 Mar 2004 18:55:10 +0000 (UTC)
| > | Path:
| >
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
| >
ul.t-online.de!t-online.de!news.glorb.com!postnews2.google.com!not-for-mail
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.access.reports:134430
| > | X-Tomcat-NG: microsoft.public.access.reports
| > |
| > | Thank you Eric,
| > | I found the problem.
| > |
| > | I also added this code(below) and it works fine but I can't click
| > | anywhere else such as if I need to scroll done when it is in the
| > | preview mode or click on the navigator to see the second page of the
| > | report. Can you help me?
| > |
| > | intUserRespond = MsgBox("Do you want to print this report?", vbYesNo,
| > | "Print Report Window")
| > | If intUserRespond = vbYes Then
| > | DoCmd.PrintOut (acPrintAll)
| > |
| > |
| > |
| > |
| > |
| > | (e-mail address removed) (Eric Butts [MSFT]) wrote in message
| > | > Hi,
| > | >
| > | > Place a break point on the line
| > | >
| > | > DoCmd.OpenReport stDocName, acViewPreview, , strWhere
| > | >
| > | > Once the code stops at the above line select the menu option View >
| > | > Immediate Window
| > | >
| > | > In the Immediate Window type
| > | > ?strWhere
| > | > then hit enter
| > | >
| > | > In the Immediate Window type
| > | > ?intReportNumber
| > | > then hit enter
| > | >
| > | > This will give you an idea as to what's wrong with the code.
| > | >
| > | >
| > | > I hope this helps! If you have additional questions on this topic,
please
| > | > respond back to this posting.
| > | >
| > | >
| > | > Regards,
| > | >
| > | > Eric Butts
| > | > Microsoft Access Support
| > | > (e-mail address removed)
| > | > "Microsoft Security Announcement: Have you installed the patch for
| > | > Microsoft Security Bulletin MS03-026? If not Microsoft strongly
advises
| > | > you to review the information at the following link regarding
Microsoft
| > | > Security Bulletin MS03-026
| > | > <
http://www.microsoft.com/security/security_bulletins/ms03-026.asp>
and/or
| > | > to visit Windows Update at <
http://windowsupdate.microsoft.com/> to
install
| > | > the patch. Running the SCAN program from the Windows Update site
will
help
| > | > to insure you are current with all security patches, not just
MS03-026."
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
rights
| > | >
| > | >
| > | >
| > | > --------------------
| > | > | From: (e-mail address removed) (Nadir)
| > | > | Newsgroups: microsoft.public.access.reports
| > | > | Subject: To open a specific report number by users input of the
report#.
| > | > | Date: 24 Mar 2004 11:41:11 -0800
| > | > | Organization:
http://groups.google.com
| > | > | Lines: 49
| > | > | Message-ID: <
[email protected]>
| > | > | NNTP-Posting-Host: 204.228.240.57
| > | > | Content-Type: text/plain; charset=ISO-8859-1
| > | > | Content-Transfer-Encoding: 8bit
| > | > | X-Trace: posting.google.com 1080157271 20510 127.0.0.1 (24 Mar
2004
19:41:11 GMT)
| > | > | X-Complaints-To: (e-mail address removed)
| > | > | NNTP-Posting-Date: Wed, 24 Mar 2004 19:41:11 +0000 (UTC)
| > | > | Path:
| > | >
| >
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
| > | >
| >
ul.t-online.de!t-online.de!border2.nntp.ash.giganews.com!border1.nntp.ash.gi
| > | >
| >
ganews.com!nntp.giganews.com!news.glorb.com!postnews2.google.com!not-for-mai
| > | > l
| > | > | Xref: cpmsftngxa06.phx.gbl microsoft.public.access.reports:134328
| > | > | X-Tomcat-NG: microsoft.public.access.reports
| > | > |
| > | > | Hi all, please help.
| > | > |
| > | > | Marshall Barton helped me with this code but I get 2 input message
| > | > | boxs and it still will open All of the reports there are. But if I
| > | > | will take this line out
| > | > |
| > | > | intReportNumber = InputBox("Please enter the report number you
wish to
| > | > | print")
| > | > |
| > | > | It will open one report BUT there are NO DATA in it.
| > | > |
| > | > |
| > | > | Else
| > | > | intReportNumber = InputBox("Please enter the report number you
wish
| > | > | to print")
| > | > | strWhere = "[qryBPLReport] = """ & intReportNumber & """"
| > | > | stDocName = "rptMasterBPLReport"
| > | > | DoCmd.OpenReport stDocName, acViewPreview, , strWhere
| > | > | End If
| > | > |
| > | > |
| > | > | The code from begging to end is:
| > | > | Option Compare Database
| > | > | Option Explicit
| > | > |
| > | > | Private Sub PrintByReport__Click()
| > | > | On Error GoTo Err_PrintByReport__Click
| > | > |
| > | > | Dim stDocName As String
| > | > | Dim intUserRespond As Integer
| > | > | Dim intReportNumber As Integer
| > | > | Dim strWhere As String
| > | > |
| > | > | If Me.Dirty Then 'save any edits
| > | > | Me.Dirty = False
| > | > | Else
| > | > | strWhere = "[qryBPLReport] = """ & [intReportNumber] &
""""
| > | > | stDocName = "rptMasterBPLReport"
| > | > | DoCmd.OpenReport stDocName, acViewPreview, , strWhere
| > | > | End If
| > | > |
| > | > | Exit_PrintByReport__Click:
| > | > | Exit Sub
| > | > |
| > | > | Err_PrintByReport__Click:
| > | > | MsgBox Err.Description
| > | > | Resume Exit_PrintByReport__Click
| > | > |
| > | > | End Sub
| > | > |
| > |
|