Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / February 2008

Tip: Looking for answers? Try searching our database.

USB cash drawer trigger in MS Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
keithb@bailworthsolutions.com - 20 Feb 2008 12:49 GMT
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
cash drawer then connects to the back of the receipt printer via an
RJ12 connector.  When I print a receipt it opens the cash drawer
without a problem.  However, what I want to do is have a button for
'Change' and when I click on it, it just opens the cash drawer without
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
Ken Snell (MVP) - 23 Feb 2008 15:29 GMT
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.

Signature

       Ken Snell
<MS ACCESS MVP>

>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
[quoted text clipped - 12 lines]
>
> Keith
keithb@bailworthsolutions.com - 25 Feb 2008 17:37 GMT
On Feb 23, 3:29 pm, "Ken Snell \(MVP\)"
<kthsneisll...@ncoomcastt.renaetl> wrote:
> You open the parallel port (assuming it's LPT1) for printing, and then send
> the Bell character to that printer:
[quoted text clipped - 38 lines]
>
> - Show quoted text -

Hi Ken,

Thanks for your help.  I am using USB002 port not LPT1.

keith
Ken Snell (MVP) - 27 Feb 2008 04:18 GMT
Did you try replacing lpt1 with usb002 in the Open statement?

Signature

       Ken Snell
<MS ACCESS MVP>

On Feb 23, 3:29 pm, "Ken Snell \(MVP\)"
<kthsneisll...@ncoomcastt.renaetl> wrote:
> You open the parallel port (assuming it's LPT1) for printing, and then
> send
[quoted text clipped - 39 lines]
>
> - Show quoted text -

Hi Ken,

Thanks for your help.  I am using USB002 port not LPT1.

keith
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.