laffman
asked on
Access Form Will Print Preview but not Print
An application I have been working on for years has stopped printing forms - any form. They all view nicely in Print Preview mode. When I try to print them, something is actually spooled to the printer, my print monitor says something is printing, but nothing ever appears on the printer (like it spooled an empty file).
This happens on any workstation I install the app on, so it is in the app and not the particular pc.
I really need to get this working again, I need to install this on other networks.
This happens on any workstation I install the app on, so it is in the app and not the particular pc.
I really need to get this working again, I need to install this on other networks.
Have u tried different printers? Perhaps there is an issue with the printer
ASKER
Yes, I should have said that I've tried this with multiple printer too.
The other thing I was going to suggest was print drivers
Have u tried creating another db, dummy tables/values and test report, does that produce the same thing?
Have u tried creating another db, dummy tables/values and test report, does that produce the same thing?
ASKER
OK, these results really narrow it down.
I ran 4 separate tests with 2 separate applications. I got the same results for both applications:
MDB w/o /RUNTIME = PRINTS
MDB with /RUNTIME = NO PRINT
MDE w/o /RUNTIME = PRINTS
MDE with /RUNTIME = NO PRINT
It also appears it does not matter whether I use full or runtime versions of Access.
Thus, the culprit basically appears to be the /runtime parameter, which I definitely need. So far, a quick search on this hasn't turned up anything yet.
Anyone with any ideas?
I ran 4 separate tests with 2 separate applications. I got the same results for both applications:
MDB w/o /RUNTIME = PRINTS
MDB with /RUNTIME = NO PRINT
MDE w/o /RUNTIME = PRINTS
MDE with /RUNTIME = NO PRINT
It also appears it does not matter whether I use full or runtime versions of Access.
Thus, the culprit basically appears to be the /runtime parameter, which I definitely need. So far, a quick search on this hasn't turned up anything yet.
Anyone with any ideas?
ASKER
I should add I had a colleague try this on his machine, he got the same results.
Obviously some limitation with runtime. I dont know what it might be. Ive posted a question in another thread asking other experts for help. Hopefully someone can come round and help you out here.
Hmm, does sound like corruption.
Did you try to create a new .mdb and import all objects with File/Get external data/Import
and/or did you run a decompile?
Nic;o)
Did you try to create a new .mdb and import all objects with File/Get external data/Import
and/or did you run a decompile?
Nic;o)
When you say the /runtime parameter, do you mean you're running your file with that param? But you're not actually running the file in a machine with only the runtime installed?
What version of Access?
What version of Access?
anybody been messing with the Layout for Print and Fast Laser Printing properties for your forms?
ASKER
First, thanks to all that have responded. I'm a long time developer and this has really got me stumped.
Let's start with Nic: Yes, I always run a decompile and compact before making an MDE and archiving my source MDB. With both applications.
LSMConsulting: Yes, I do mean I am running the file with that param. All machines this has been tried on (4 different PCs) have full versions of Access 2000. I get the same results with both full and runtime versions of Access.
Stevbe: I'm the only developer on these two applications, and have never messed with these properties.
Has anyone else run into this same situation?
Let's start with Nic: Yes, I always run a decompile and compact before making an MDE and archiving my source MDB. With both applications.
LSMConsulting: Yes, I do mean I am running the file with that param. All machines this has been tried on (4 different PCs) have full versions of Access 2000. I get the same results with both full and runtime versions of Access.
Stevbe: I'm the only developer on these two applications, and have never messed with these properties.
Has anyone else run into this same situation?
Hello laffman
Actually, I have, but that was some versions ago (Access 95, perhaps).
The problem was that I had last modified my application on my laptop, which had only a crummy deskjet printer as default printer. All my reports got corrupted (I didn't print forms, but the symptoms look familiar). The full version of Access was able to correct the reports for better laser printers (a sort of last-minute design adjustment), but the runtime version was not.
Try this: set a good and reliable default printer (even a dummy print-to-file printer) and create a new form, with a "print this" button. Does this new form behave like the others? I bet it doesn't.
If that new form works, try to edit your forms with that same good default printer. If that doesn't solve it, save your forms as text and reimport them from text. If that doesn't work, edit the text version of your forms to remove all printer-specific information (thus you get the default) and import again.
The commands are called (from VB) "savetotext" and "loadfromtext".
The trick for MDE files and runtime versions is this: always use the lowest target OS (patched), with only the desired version of Access installed, and the best target printer driver (any Postcript printer will do).
Hope this helps
(°v°)
Actually, I have, but that was some versions ago (Access 95, perhaps).
The problem was that I had last modified my application on my laptop, which had only a crummy deskjet printer as default printer. All my reports got corrupted (I didn't print forms, but the symptoms look familiar). The full version of Access was able to correct the reports for better laser printers (a sort of last-minute design adjustment), but the runtime version was not.
Try this: set a good and reliable default printer (even a dummy print-to-file printer) and create a new form, with a "print this" button. Does this new form behave like the others? I bet it doesn't.
If that new form works, try to edit your forms with that same good default printer. If that doesn't solve it, save your forms as text and reimport them from text. If that doesn't work, edit the text version of your forms to remove all printer-specific information (thus you get the default) and import again.
The commands are called (from VB) "savetotext" and "loadfromtext".
The trick for MDE files and runtime versions is this: always use the lowest target OS (patched), with only the desired version of Access installed, and the best target printer driver (any Postcript printer will do).
Hope this helps
(°v°)
ASKER
Well, I've ended up answering my own question.
Besides all I've tried so far, I've also pondered the age-old question, "What has changed since it worked?". This has been tough, because it's been a while since I last used this function in my test environment, so a lot has changed since I remember using it. A LOT. My first hunch turned out to be correct - I had added a Form_Timer event to my main menu. I set the TimerInterval to zero, and voila, it prints again!
My Form_Timer event does not have to run when a form is being printed. Since the print icon in my toolbar opens the print dialog box when a form is the active object, I just stop the event for the print command, as in:
Forms!MyForm.Form.TimerInt erval = 0
On Error Resume Next ' print failures don't crash the app, so this is a-ok to use here
DoCmd.RunCommand acCmdPrint
Forms!MyhForm.Form.TimerIn terval = 2000
Hmm, so what do I do when I end up answering my own question?
Besides all I've tried so far, I've also pondered the age-old question, "What has changed since it worked?". This has been tough, because it's been a while since I last used this function in my test environment, so a lot has changed since I remember using it. A LOT. My first hunch turned out to be correct - I had added a Form_Timer event to my main menu. I set the TimerInterval to zero, and voila, it prints again!
My Form_Timer event does not have to run when a form is being printed. Since the print icon in my toolbar opens the print dialog box when a form is the active object, I just stop the event for the print command, as in:
Forms!MyForm.Form.TimerInt
On Error Resume Next ' print failures don't crash the app, so this is a-ok to use here
DoCmd.RunCommand acCmdPrint
Forms!MyhForm.Form.TimerIn
Hmm, so what do I do when I end up answering my own question?
> Hmm, so what do I do when I end up answering my own question?
Turn to using a report for printing ...
/gustav
Turn to using a report for printing ...
/gustav
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.