Sending data to a serial or parallel port from Access

K

ksteger

I have a custom billing application that I support for a small utility
company that we wrote using MS Access. They want to add the electronic
cashiering capabilities complete with the barcode scanning, receipt
printer and cash drawers that pop open when a transaction takes place.

Now I know how to do the bar code scanning part. I understand
logistically how to communicate with the printer (which in turn
communicates with the cash drawer). What I don't know is how to do that
from MS Access. For that matter I am not even sure if it is possible to
do from Access.

The printer documentation has all the hexidecimal codes to do
everything I need to do with the printer including to tell it to open
the cash drawer. What I don't have a clue how to do is send that data
from Access to the serial or parallel port.

Now of course I can always go the course of finding a company with the
software for cashiering services but at this point I would rather not
do that if possible.

I wasn't sure which topic to put this under to begin with so I just
went for the general topic. Any insight anyone can give me is greatly
appreciated.

Thanks!
-Kim
 
R

Ron Hinds

I have a custom billing application that I support for a small utility
company that we wrote using MS Access. They want to add the electronic
cashiering capabilities complete with the barcode scanning, receipt
printer and cash drawers that pop open when a transaction takes place.

Now I know how to do the bar code scanning part. I understand
logistically how to communicate with the printer (which in turn
communicates with the cash drawer). What I don't know is how to do that
from MS Access. For that matter I am not even sure if it is possible to
do from Access.

The printer documentation has all the hexidecimal codes to do
everything I need to do with the printer including to tell it to open
the cash drawer. What I don't have a clue how to do is send that data
from Access to the serial or parallel port.

Now of course I can always go the course of finding a company with the
software for cashiering services but at this point I would rather not
do that if possible.

I wasn't sure which topic to put this under to begin with so I just
went for the general topic. Any insight anyone can give me is greatly
appreciated.

Thanks!
-Kim

You can Open a LPT port for writing just like opening a file for writing.
Then, write the hex codes to it. I don't remember the exact syntax but it
should be fairly easy to find in the Help files. Something like:

Dim iFile As Integer
Dim HexCodes As String

iFile = FreeFile
Open "LPT1" For Output As iFile
'send hex codes etc.
Print iFile, HexCodes
Close iFile
 

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