473,769 Members | 6,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OpenReport with acDialog parameter

Hello,

In Access 2003 one can use OpenReport with the acDialog parameter to
open a report modally. However, doing this prevents the report's
toolbars from displaying. Is there a way around this?
I would like to be able to open a report modally and still allow my
users to print in the way they've become accustomed to, i.e., by
clicking on the Print button on the toolbar.

Bruce

Nov 13 '05 #1
3 10757
br***@aristotle .net wrote:
In Access 2003 one can use OpenReport with the acDialog parameter to
open a report modally. However, doing this prevents the report's
toolbars from displaying. Is there a way around this?
I would like to be able to open a report modally and still allow my
users to print in the way they've become accustomed to, i.e., by
clicking on the Print button on the toolbar.


Bruce, have you tried just chnaging the modal property of the report to
yes? I've never had a requirement for this in my apps that I can
recall, but I just quickly did it and the report preview showed with the
tool bar. Then you don't have to worry about the windows mode argument
in the domcmd object:

DoCmd.OpenRepor t "MyReport", acViewPreview
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #2

Tim Marshall wrote:
br***@aristotle .net wrote:
In Access 2003 one can use OpenReport with the acDialog parameter to open a report modally. However, doing this prevents the report's
toolbars from displaying. Is there a way around this?
I would like to be able to open a report modally and still allow my
users to print in the way they've become accustomed to, i.e., by
clicking on the Print button on the toolbar.
Bruce, have you tried just chnaging the modal property of the report

to yes? I've never had a requirement for this in my apps that I can
recall, but I just quickly did it and the report preview showed with the tool bar. Then you don't have to worry about the windows mode argument in the domcmd object:

DoCmd.OpenRepor t "MyReport", acViewPreview


Hi Tim,

Thanks for the suggestion but sadly it did not work in my situation. I
have a modal form that begins an import process into my database from
an external comma delimited file. If there are any warnings to be
displayed, a second modal form pops up displaying the warnings in a
listbox. If the user wants a report of these, there is a command
button that brings up a report in preview mode that he/she can then
print out. Unfortunately the two modal forms that are being displayed
at that time prevent the report from coming to the forefront unless I
open the report with the acDialog parameter or at least set the popup
property to true in the report, but setting popup to true has the
unfortunate side effect of getting rid of the toolbars. Unfortunately
setting the modal property doesn't bring the report to the forefront
when previewed from a modal form. I ended up just making the command
button print the report rather than display it in preview mode as this
made more sense anyway (they've already got the form to see the
warnings on). At any rate, thanks for the suggestion!

Bruce

Nov 13 '05 #3
br***@aristotle .net wrote:
Thanks for the suggestion but sadly it did not work in my situation. I
have a modal form that begins an import process into my database from
an external comma delimited file. If there are any warnings to be
displayed, a second modal form pops up displaying the warnings in a
listbox. If the user wants a report of these, there is a command
button that brings up a report in preview mode that he/she can then
print out. Unfortunately the two modal forms that are being displayed
at that time prevent the report from coming to the forefront unless I
open the report with the acDialog parameter or at least set the popup
property to true in the report, but setting popup to true has the
unfortunate side effect of getting rid of the toolbars. Unfortunately
setting the modal property doesn't bring the report to the forefront
when previewed from a modal form. I ended up just making the command
button print the report rather than display it in preview mode as this
made more sense anyway (they've already got the form to see the
warnings on). At any rate, thanks for the suggestion!


What about playing with modal and popup properties of the two forms via
the proc associated with the command button on the second modal form?

Something like (aircode):

Private Sub btnShowErrorRep ort_Click()

me.modal = false 'second form

'It may or my not be necessary to setfocus to the form before changing
modal property, I don't know

forms!frmImport Form.modal = false 'first form1

DoCmd.OpenRepor t "MyReport", acViewPreview

End Sub

The report would not have to be modal

In the on close event of the report:

Private Sub rptErrorReport_ Close()

'As per the abov proc, it may or my not be necessary to setfocus to the
form before changing modal property, I don't know

'the order in which these are made modal might have some effect, I
don't know.

formsfrmError.m odal = true 'second form

forms!frmImport Form.modal = true 'first form

End Sub

Whether you twiddle with the modal properties in VBA or not I would
personally redesign my process so that I could get the report preview
first. Perhaps by having the import process close all other forms and
the closure of the main form in the import process causing the closing
of any related forms or report previews.

OTOH, if the report only shows what the error form is displaying in the
list box, then going straight to the printer would be acceptable in my
opinion, anyway.

And, after having written all the above, it occurs to me that my previou
paragraph may wel be the way to go, but I'm too ticked with myself to
erase everything above it!!! 8) 8) 80
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13000
by: Aaron | last post by:
Hello, I'm trying to limit a report to a list of parameters that I pass in. The report and the underlying query both use the column FirstName. Whenever I try to limit the FirstName in via the "Where" clause, I get prompted to input the FirstName parameter, even though I'm passing it in via OpenReport The syntax I tried using:
1
3876
by: Andrew | last post by:
Hi All: I am using Access2000 and I find that the command to open an Access report in preview mode is very slow: DoCmd.OpenReport rptABC, acViewPreview, "", "" The scenario is this: - The following codes are written in the VB Applcation. - Prior to opening the report, I set its recordsource with a sql: ..Reports!rptABC.RecordSource = sSql. The sSql searches for a specific
3
2517
by: Blah | last post by:
Hello, I'm trying to use the where clause in OpenReport to limit the data return on the subreport. Is there a way to do it using that method or OpenReport only work with the report you're opening? Thanks
1
4488
by: Tom Louchbaum | last post by:
Can someonw pls tell me how to reference the Where clause made by the VBA statement DoCmd.OPENREPORT "Report",acviewpreview,,where as a control within the Report itself? Thanks.
5
28955
by: fearblanco | last post by:
Hello - I am receiving the below error message when attempting to open a report. This database is used by approximately 20 users and only one user is having this problem (even I can't duplicate this error on my own PC). The command being used is DoCmd.OpenReport "rptSYS_ChangeInARDaily", acViewPreview OR DoCmd.OpenReport "rptSYS_ChangeInARDaily", acViewPreview, , "Collector=
5
2901
by: MLH | last post by:
Having identified a A97 bug in which acDialog causes undesirable side effects processing the opened form, I would like to replace the following code running in MyForm ... DoCmd.OpenForm "frmVehicleChooserForm", , , , , acDialog .... (more code I want to run after suspension) With this new approach... DoCmd.OpenForm "frmVehicleChooserForm", , , , , , ThisForm Me.Visible = False
8
3869
by: Ragbrai | last post by:
Howdy all, I have a form for entering data (Form A), on which is a cmd button that opens Form B in acdialog mode to allow me to enter/edit records that are being displayed on Form A. After adding/editing a record on Form B (opened in acDialog mode), I want a cmd button on Form B to close Form B and then have Form A automatically take me to the record that was added/edited in Form B (Form A has a subform that I will then enter data into). ...
3
6459
by: russellhq | last post by:
Hi, i am trying to open a report based on values picked in a form but get stuck with one of the values. I have a feeling it has to do with the yes/no datatype but am not sure since I am quite new to access VBA. I'm using Access2003 Below is my code extract. The tblWelderQualification.Stamped field is a yes/no field, I want to show records that have a "TRUE" value when the checkbox on the form is ticked. When I run the code, I get the...
4
6677
by: gazza10001 | last post by:
Hi i hope you can help my company uses access and has modified for its needs usually what happens is you serach for the invoice by its number and then it brings all the information up such as entry fields and so there is a button you press which then takes to through to a print preview of the invoice and you print out the invoice but recent ly this message ahs started appearing and does not allow you to view the print preview of the invoice...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.