Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing using the Print command in access 1

Status
Not open for further replies.

tprscott

Programmer
Jul 17, 2006
8
US
I have the following code which I found on here:

Open "Com1:960,n,8,1" For output as #1
Print #1, chr$(27); "T";
Print #1, "Hello World"
Close #1

I have a printer on lpt1 port. I changed the com1 to lpt1 and it does not work. I also have another machine that is running access 97 and has a printer on com2. When i try to print on the access 97 machine this way I get unable to open file. Any ideas?
 
I have a printer on lpt1 port
Have you tried this ?
Open "LPT1:" For Output As #1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah I have but what I found is when i did that it did not print right away. I printed something else out and then a page with hello world is printed first. Any other ideas?
 
And this ?
Open "LPT1:" For Output As #1
Print #1, Chr$(27) & "T";
Print #1, "Hello World"
Print #1, Chr$(12)
Close #1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top