Re: USB cash drawer trigger in MS Access



Did you try replacing lpt1 with usb002 in the Open statement?

--

Ken Snell
<MS ACCESS MVP>


<keithb@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:30aae5a2-6f27-4301-9fb7-bea541f6c15d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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


.