Answered by:
Print anomaly?

Question
-
In A2003 I have a main form, containing a number of subforms. The controls on the subforms are unbound, but contain data as in the example:
When I display the form in Print preview, all looks normal. However, when I print the form no data is displayed, all controls are just blank.
Is this normal behavior, or have I overlooked something? Or is it a bug?
Unfortunately I cannot test this in higher versions of Access.
Thanks, Imb.
Friday, September 25, 2015 3:15 PM
Answers
-
Can I conclude that this is an omission from Microsoft, on purpose or not on purpose?
Imb.
Mosca not know. Mosca only pawn in game of life.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_Professionals- Marked as answer by Imb-hb Friday, September 25, 2015 9:19 PM
Friday, September 25, 2015 9:10 PM
All replies
-
Hi Imb. I just tested it using 2010, and the unbound data showed up on the hard copy. Hope that helps with your troubleshooting...Friday, September 25, 2015 4:02 PM
-
Hi Imb. I just tested it using 2010, and the unbound data showed up on the hard copy. Hope that helps with your troubleshooting...
Hi DB guy,
Thank you for your answer. On this moment it does not yet help me. Apparently this fact does not occur (anymore?) in A2010.
The user who reported this anomaly, is using A2007, as far as I can remember. Next Thursday I can check that. Is there some setting that I overlooked?
Imb.
Friday, September 25, 2015 4:13 PM -
Imb - how are you populating those unbound controls? I just tested using control sources like ="hello" and everything printed with Access 2003. I even opened the form in 2010 and it printed okay. Then again, it could be 2007 that is the root cause.
You might have to create a report instead of printing the form.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsFriday, September 25, 2015 4:47 PM -
Imb - how are you populating those unbound controls? I just tested using control sources like ="hello" and everything printed with Access 2003. I even opened the form in 2010 and it printed okay. Then again, it could be 2007 that is the root cause.
Hi Bill,
In the form you can take the columns as subforms, whereby each subform has a number of controls, with a systematic name like "Veld1" to "Veld10". The controls can be filled by code, or manually.
I develop in A2003. The user who saw the "blank effect" first, is (probably) using A2007, but I see this "blank effect" also in A2003. So it is not typical the Access version itself, I think.
Your advise to use a report to print instead of the form is not the question. I have a routine that generates a rtf-file, that mimics the functional part of the (any) form. It was by accident that the user went printing via File> Print (in Dutch: Bestand> Afdrukken), and was of course disappointed in the result. My point is that I do not understand what is happening here.
Imb.
Friday, September 25, 2015 5:49 PM -
Imb - I just realized I was hardcoding the values by setting the ControlSource. When I left the controls truly unbound the entries did not print.
Here's one more reason not to print forms. Microsoft has always held the stance that form printing is only really meant to be used for design documentation purposes only and is not supposed to be used like a report.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsFriday, September 25, 2015 7:52 PM -
Imb - I just realized I was hardcoding the values by setting the ControlSource. When I left the controls truly unbound the entries did not print.
Here's one more reason not to print forms. Microsoft has always held the stance that form printing is only really meant to be used for design documentation purposes only and is not supposed to be used like a report.
Hi Bill,
Thank you for your reaction. I am glad you could reproduce this "blank effect".
Can I conclude that this is an omission from Microsoft, on purpose or not on purpose?
About printing forms, I never used that functionality (it costs too much ink, bad page handling), that is why I only now discovered this effect after many years of Access development. Build in in the generalized forms I have a functionality to export the data to rtf, csv of html files, and soon also xml.
By the way, through this development of the rtf-routines, I do not use Access-reports anymore. It gives me far more flexibility to generate reports directly in rtf-format.
Imb.
Friday, September 25, 2015 8:24 PM -
Can I conclude that this is an omission from Microsoft, on purpose or not on purpose?
Imb.
Mosca not know. Mosca only pawn in game of life.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_Professionals- Marked as answer by Imb-hb Friday, September 25, 2015 9:19 PM
Friday, September 25, 2015 9:10 PM -
Hi Imb,
I used to have this problem then a made a function in a general module and called it from several forms. Maybe you can use it in this case?
Function ap_Print() Dim frm As Form Set frm = Screen.ActiveForm Select Case frm.Name Case "Accounting" DoCmd.PrintOut acSelection DoEvents Case "Company" DoCmd.PrintOut acSelection DoEvents Case "MainForm" DoCmd.PrintOut acSelection DoEvents Case Else MsgBox "Form " & frm.Name & " This Form is not for printing.", vbExclamation, "Invalid Form Selection" Exit Function End Select End Function
Just takes a click to give thanks for a helpful post or answer.
Please vote “Helpful” or Mark as “Answer” as appropriate.
Chris Ward
Microsoft Community Contributor 2012Friday, September 25, 2015 9:58 PM -
I used to have this problem then a made a function in a general module and called it from several forms. Maybe you can use it in this case?
Hi Chris,
Thank you, but I have already my own procedure to print the information on a form. though I use it not too much.
I use forms, besides for input, mostly to signal things, and then take the appropriate action. In this respect my dynamical menus are very important. It is then seldom necessary to have a hard copy.
But here, by accident, one user used the print possibility of Access to print the form. What surprised me very much was that you could see the form correct displayed in preprint view, but without any data in a hard copy. I would not let such malbehaviour in my applications!
Imb.
Saturday, September 26, 2015 5:29 AM