Re: USB cash drawer trigger in MS Access
- From: keithb@xxxxxxxxxxxxxxxxxxxxxx
- Date: Mon, 25 Feb 2008 09:37:05 -0800 (PST)
On Feb 23, 3:29 pm, "Ken Snell \(MVP\)"
<kthsneisll...@xxxxxxxxxxxxxxxxxx> wrote:
You open the parallel port (assuming it's LPT1) for printing, and then send
the Bell character to that printer:
Public Sub OpenTheCashDrawer()
Dim intFreeFile As Integer
intFreeFile = FreeFile()
Open "lpt1" For Random As #intFreeFile
Print #intFreeFile, Chr(7)
Close #intFreeFile
End Sub
Note that the above code will not work if you're running ACCESS 2003 as a
runtime installation. If that is what you're doing, post back and I'll
provide different code that will work in that environment.
--
Ken Snell
<MS ACCESS MVP>
<kei...@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:d714d94c-1bc5-4dda-8e63-5781832da987@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a till system running on MS Access 2003 and have my receipt
printer (Star Micronics TSP100) connected to my PC in USB002 port. My
cashdrawerthen connects to the back of the receipt printer via an
RJ12 connector. When I print a receipt it opens thecashdrawer
without a problem. However, what I want to do is have a button for
'Change' and when I click on it, it just opens thecashdrawerwithout
needing to print anything.
I have trawled through the accompanying documentation wthat came with
the printer and it says that I need to send Chr(7) to the printer to
do this. However, I dont know how I can achieve this. Can anybody
help me with this?
Thanks in advance
Keith- Hide quoted text -
- Show quoted text -
Hi Ken,
Thanks for your help. I am using USB002 port not LPT1.
keith
.
- Follow-Ups:
- Re: USB cash drawer trigger in MS Access
- From: Ken Snell \(MVP\)
- Re: USB cash drawer trigger in MS Access
- References:
- USB cash drawer trigger in MS Access
- From: keithb
- Re: USB cash drawer trigger in MS Access
- From: Ken Snell \(MVP\)
- USB cash drawer trigger in MS Access
- Prev by Date: Re: Error 3155- Is there no solution?
- Next by Date: Deleting Sharepoint Linked Tables
- Previous by thread: Re: USB cash drawer trigger in MS Access
- Next by thread: Re: USB cash drawer trigger in MS Access
- Index(es):