473,654 Members | 2,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

disable close button in access report globally

1 New Member
I want to disable close button for each report and it would apply to all users. Is there any script or method available which will disable close button for all reports at once without using properties. Please let me know the ideas to do.

It would be better if the close button of all reports are disabled globally (if common propertity or script available)

Thanks in advance,
Jagan
Jan 22 '08 #1
1 2486
sierra7
446 Recognized Expert Contributor
Hi Jagan

I presume you mean the Reports Preview screen??

Firstly, I do not know of any way to globally set this behaviour

Secondly, I can't understand why you would want to do this.? If a report is being previewed and can't be closed, then what is the good of that?

Nevertheless, I have tried to emulate this behaviour with code. First I tried to re-open the report on the Deactivate event
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Deactivate()
  2.     DoCmd.OpenReport "Overdue Sales Orders", acViewPreview
  3. End Sub
Curiously, this works once. The second time you try the the report closes.

Next I checked 'Close Button = No' in report Format properties. This seems to give the effect you wanted.

Finally, I tried to set this property using code in the On_Open event (where you made have made it conditional should you ever want to)
Expand|Select|Wrap|Line Numbers
  1. Me.CloseButton = False
Howevr, Access would not allow this property to be set at runtime.

S7
Jan 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2712
by: Reggie | last post by:
Hi and TIA! I have a form and have set the Close Button to false so that users must exit using my close button. However when I open a Report from this form I want the close button to be available from the report print preview window. However, the first time I open the report to preview it the close button (X) in upper right hand corner is there. When I close the preview and open it again it is not there unless I close the app down and...
3
2983
by: bobdydd | last post by:
Hi Everybody On Report Preview Does anyone know of a way to disable the Minimum, Maximum and Close buttons, so that the user cannot close by any other means that the Toolbar button that I have supplied. This is easy enough on Access 2000 FORMS in Properties>>Format etc, but this is not available on a REPORT.
6
2795
by: Raghu Raman | last post by:
Hi, we are doing an in house project in c#.net(asp.net).We wanted to close our application when ever the user presses the SIGNOUT button. Even though we programtically disconnects them from the database,when we press the Internet explorers Back button ,all the browsed pages are displayed with the data**. 1.could you pls tell me how to disable the back-button of IE
16
6257
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
7
9486
by: Wayne | last post by:
I have found the following code on this newsgroup that removes the Access Application minimize, restore and close buttons. Private Const GWL_EXSTYLE = (-20) Private Const GWL_STYLE = (-16) Private Const WS_MAXIMIZEBOX = &H10000 Private Const WS_MINIMIZEBOX = &H20000 Private Const WS_SYSMENU = &H80000
4
2501
by: zack | last post by:
Any help with this would be greatly appreciated, as cannot work out how to resolve. I have a report called "3_Strikes". In its 'On open' event is command to also open a criteria form popup form called, "3_Strikes_Search". The purpose of the form is to allow input of data to filter the results of the report, (In this case mail-merged letters). The issue I have is that when I open the report via a command button, the "3_Strikes_Search"...
2
2531
by: PamelaDV | last post by:
I am wondering if there is a way to disable the "X" used to close the Access application window? I know how to disable it for individual forms, but I would like to disable it for the application in general and force users to use a button on the switchboard to close (because I run important code on the close of the database from that button). Any ideas are always appreciated. Thanks!
1
1676
by: jamesdel | last post by:
Hi I know how to disable the close button of the main access window. But i am not able to disable the maximum button. Can anyone help me in this regard. It certainly needs API function calling procedure. So anybody who is good in API can help me. I have disable the close button through this. But when i am trying to disable the maximum button using this same technique i am not getting the correct result. John
2
3359
by: Bruce | last post by:
Hello, I have a form in an Access 2003 application which opens maximized. Its CloseButton property is set to false. On this form I have a command button that opens a report in preview mode. The report opens fine. It opens maximized as one would expect. However, the report preview window's close button is disabled which is confusing to my users (they have to click the resize button on the preview window which then restores the close...
0
8375
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
8815
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
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
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
5622
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
4149
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...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
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
2
1593
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.