How to print a line to line printer

D

Daryl

Dear All,

I would like to print a single line one line at a time to a line printer
with windows driver, how? If I use Access report to print a line, it will
print a singe line and line feed a whole page. Did anyone know how?

Thank you in Advance.


Daryl
 
A

Arvin Meyer [MVP]

I'd try to create a printer using the Windows Generic Text driver. Then I'd
try setting that printer for your Access report. Failing that I'd try some
old fashion I/O code like (air code):

Here's some Access code that will write "Hello World" to the LPT1

Sub OutputToPrinter ()
Dim intFileNumber As Integer
intFileNumber = FreeFile
Open "LPT1" For Output As intFileNumber
Print #intFileNumber, "Hello World"
Close intFileNumber
End Sub

If using a laser printer, press form feed to see the output.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
D

Daryl

Thank you for your suggestion. But the problem is, when the line printer is
off line or turned off, then the Access program will hangs. That's why I am
trying to find out some other method. Do you have any idea? Thanks
 
Top