Here's a sample to make the printer port do what you want it to do. There
must be an easier way to talk to the IO ports (give me the old peek/poke
days) but haven't found it yet. I haven't tested this code completely yet,
but I'm sure it'll lead you in the right direction.
Public Sub open_cashdrawer()
Dim intFileNo As Integer = FreeFile()
FileOpen(1, "c:\escapes.txt", OpenMode.Output)
PrintLine(1, Chr(27) & "p" & Chr(0) & Chr(25) & Chr(250))
FileClose(1)
Shell("print /d:lpt1 c:\escapes.txt", vbNormalFocus)
End Sub
The truth is though, every cash drawer is different. Either check the book
for the exact details, call the manufacturer or check out
http://pages.prodigy.net/daleharris/popopen.htm, there are many drawers in
there!!
Dominic
MS-Access Wizard of Oz-tralia,
"ARC" <PC*****@PCESoft.invalidwrote in message
news:oS******************@newssvr21.news.prodigy.n et...
>I have a user asking if I could put in a code that will open a register
drawer. My understanding is the receipt printer will normally send the code
the cash drawer. Is there a vba function that someone can share that will
open a drawer without printing? Or does it depend on the drawer? I suppose
if it's just a sequence of characters, then it could be made customizable
to work for many different users. Any ideas?
Thanks!
Andy