How to send ASCII messages to port

M

Martin

Hi, I´m expecting to get some help on this issue. I have a printer which uses
ASCII codes to work (I got them from manufacturer), but I don´t know how to
send these messages to a COM3 port from access (I´m working with Access
2003).

Does anyone of you know how to do that? I was wondering if there´s an API
for that. At least, turn on the lights, please.

Any help on this is greatly appreciated, thanks in advance.
 
S

Stefan Hoffmann

hi Martin,
Hi, I´m expecting to get some help on this issue. I have a printer which uses
ASCII codes to work (I got them from manufacturer), but I don´t know how to
send these messages to a COM3 port from access (I´m working with Access
2003).
E.g.:

Dim command As String
Dim fileHandle As Long

command = Chr(13) ' your ASCII sequence
fileHandle = FreeFile
Open "COM3:" For Output As #fileHandle
Print #fileHandle, command
Close #fileHandle


mfG
--> stefan <--
 
S

Stuart McCall

Martin said:
Hi, I´m expecting to get some help on this issue. I have a printer which
uses
ASCII codes to work (I got them from manufacturer), but I don´t know how
to
send these messages to a COM3 port from access (I´m working with Access
2003).

Does anyone of you know how to do that? I was wondering if there´s an API
for that. At least, turn on the lights, please.

Any help on this is greatly appreciated, thanks in advance.

You could try my LinePrinter class module, which is able to send binary data
to a named printer, using the Windows Print spooler. The printer can either
be connected locally, or on a network.

So long as your printer is configured correctly, the spooler will find it
and do the job.

Get the class module and a sample mdb here:

http://www.smccall.demon.co.uk/Downloads.htm#LinePrint
 
M

MartinAE via AccessMonster.com

Thank you very much... you really turned the lights on... I'm gonna try it...
 
M

MartinAE via AccessMonster.com

Thanks Stuart... I do really appreciate your help

Stuart said:
Hi, I´m expecting to get some help on this issue. I have a printer which
uses
[quoted text clipped - 7 lines]
Any help on this is greatly appreciated, thanks in advance.

You could try my LinePrinter class module, which is able to send binary data
to a named printer, using the Windows Print spooler. The printer can either
be connected locally, or on a network.

So long as your printer is configured correctly, the spooler will find it
and do the job.

Get the class module and a sample mdb here:

http://www.smccall.demon.co.uk/Downloads.htm#LinePrint
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top