How to send ASCII messages to port

  • Thread starter Thread starter Martin
  • Start date Start date
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.
 
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 <--
 
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
 
Back
Top