Hi
I have a form in Access which is bound. I have a series of reports that are produced whoch the user can print.
However when the user is on the data form if they click print, they print all records, each record as a screen print!
Is there any way of stopping this?
Thanks
5 2561
I suspect that when the command button for printing the report was placed on the form the wizard was used and Print Form was selected instead of Print (or Preview) Report. You will be able to tell for certain if you go to the code for the On Click event of the command button. If the code of the On click sub says something like this - DoCmd.SelectObject acForm, stDocName, True
-
DoCmd.PrintOut
-
DoCmd.SelectObject acForm, MyForm.Name, False
replace it with - DoCmd.OpenReport stDocName, acPreview
where stDocName is the name of your report. This will open the report in print preview mode (which then allows the user to select a printer to print the report and so on).
-Stewart
I suspect that when the command button for printing the report was placed on the form the wizard was used and Print Form was selected instead of Print (or Preview) Report. You will be able to tell for certain if you go to the code for the On Click event of the command button. If the code of the On click sub says something like this - DoCmd.SelectObject acForm, stDocName, True
-
DoCmd.PrintOut
-
DoCmd.SelectObject acForm, MyForm.Name, False
replace it with - DoCmd.OpenReport stDocName, acPreview
where stDocName is the name of your report. This will open the report in print preview mode (which then allows the user to select a printer to print the report and so on).
-Stewart
Hi Stewart
Thanks for the reply but I dont think I explained myself very well!!
The 'print' is the basic print command on the menubar. When the user is on a dataform if they click Select Print from the drop down menu it prints all records on the form as screenshots.
I want the print option but only for printing reports. any way of stopping printing when the user is on a form?
Thanks
Well, you could modify the menu to remove or disable the print command, or you could provide a custom menu for your users (a better option) but my own preference would be to add a command button to the main form which allows the users to print without selecting menu options to do so.
-Stewart
Well, you could modify the menu to remove or disable the print command, or you could provide a custom menu for your users (a better option) but my own preference would be to add a command button to the main form which allows the users to print without selecting menu options to do so.
-Stewart
Well i have got a custom menu but it has the print button on it!!
I also have a command button on the form which previews a report but then I need a menu item to allow the user to print the report. If i code my own custom menu item eg
docmd.Printout rptName
it prints the whole report and doesnt bring up the print dialog screen. So therefore Im using the default print menu item provided by microsoft so I can display the print dialog screen. But this means the print menu item is available when just the main form is showing and therefore users can print all the records off as screenshots!!
I just want a print menu item which only allows the user to print a report not a form.
I hope this makes sense.
Well i have got a custom menu but it has the print button on it!!
I also have a command button on the form which previews a report but then I need a menu item to allow the user to print the report. If i code my own custom menu item eg
docmd.Printout rptName
it prints the whole report and doesnt bring up the print dialog screen. So therefore Im using the default print menu item provided by microsoft so I can display the print dialog screen. But this means the print menu item is available when just the main form is showing and therefore users can print all the records off as screenshots!!
I just want a print menu item which only allows the user to print a report not a form.
I hope this makes sense.
Hi Stewart
I think Ive solved my problem. I have just disabled the menu which allows users to print and then enabled it when they load a report and then disable it again when they close the report. Seems to be working OK.
Thanks for your help
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Noesis Strategy |
last post by:
My firm is creating a database that profiles (about 100) companies in
various sectors. Each profile is about 10 pages long with perhaps 150
parameters. Some of the parameters will contain a half...
|
by: Kenneth_J |
last post by:
Hey everyone,
I just started doin some work with access and vba, and don't know
much about it yet...any help would be much appreciated.
My goal is to create a form in word that can be filled...
|
by: Yannick Turgeon |
last post by:
Hello,
We are in the process of examining our current main application. We have to
do some major changes and, in the process, are questionning/validating the
use of MS Access as front-end. The...
|
by: dog |
last post by:
I've seen plenty of articles on this topic but none of them have been
able to solve my problem.
I am working with an Access 97 database on an NT4.0 machine, which has
many Access reports.
I...
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on...
|
by: MS |
last post by:
Access 97 here.
I want a simple way to "lock" certain records on a form. Some records remain
"live" until all data is available which happens over time. When all the
fields are complete, I want...
|
by: Cheryl Langdon |
last post by:
Hello everyone,
This is my first attempt at getting help in this manner. Please
forgive me if this is an inappropriate request.
I suddenly find myself in urgent need of instruction on how to...
|
by: JonC |
last post by:
I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the...
|
by: tekctrl |
last post by:
Environment; Win2K PC with 1Gb of RAM and plenty of HD space running Access
2002
Issue; Access presents a blank data entry form in the Forms view when the
New Record icon is used. However, it...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |