473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Access Data Form Doesn't Allow Printing All Records

39
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
Jun 4 '08 #1
5 2561
Stewart Ross
2,545 Expert Mod 2GB
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
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SelectObject acForm, stDocName, True
  2. DoCmd.PrintOut
  3. DoCmd.SelectObject acForm, MyForm.Name, False
replace it with
Expand|Select|Wrap|Line Numbers
  1. 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
Jun 4 '08 #2
JC2710
39
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
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SelectObject acForm, stDocName, True
  2. DoCmd.PrintOut
  3. DoCmd.SelectObject acForm, MyForm.Name, False
replace it with
Expand|Select|Wrap|Line Numbers
  1. 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
Jun 5 '08 #3
Stewart Ross
2,545 Expert Mod 2GB
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
Jun 5 '08 #4
JC2710
39
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.
Jun 6 '08 #5
JC2710
39
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
Jun 6 '08 #6

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

Similar topics

9
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...
7
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...
49
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...
7
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...
11
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...
6
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...
15
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...
6
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...
12
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
0
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...
0
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,...
0
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...
0
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...
0
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...
0
tracyyun
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...
0
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,...

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.