Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 20th, 2006, 04:24 PM
Registered User
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Controling Cash Register With VBA Code

Hi There
I Have Finished A Point Of Sale Program On Access, I Still Need To ControlThe Cash Register Drawer By Code.
In The Manual It Is Mentionned

To Open The Drawer through com1 under qbasic

OPEN "COM1:300,N8,1"
PRINT #1,"0000000000"

Anuy Help On This Subject ?
Thanks In Advance
Old December 19th, 2006, 03:00 PM
Registered User
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to josebenzan

Hi, i'm doing the same thing.. and i would like to know if you resolved it...
can u help me?

Old February 2nd, 2007, 11:12 AM
Registered User
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Hi guys,

Just signed up so I can post this so I hope it's of some help. I've just been programming a till system here, only I'm using Excel VBA not Access but the theory is the same.

The code you mentioned is used to write to a COM port in much the same way you would open a TXT file and write to it. Here's a brief explanation:

OPEN "COM1:9600,N8,1"
    This says COM1 (obvious), 9600 BAUD, N = the Parity (in this case NONE), 1 = Stop bits.
You can just say OPEN "COM1", but this will use whatever settings were last used for that port. If you reboot, those settings are lost so it's a good idea to specify the settings.

As for cash drawer control (plus a few others), here's what I discovered after much digging. The following are all ESC/POS commands (most sent in HEX code) that are compatible with most (please test) ESC/POS thermal printers. I'm using an Epson TM-H6000II thermal printer just FYI.

'These lines reset the printer and setup the symbol set (printing a £ sign, you use the #)
    Print #1, Chr$(&H1B); "="; Chr$(1); ' start printer
    Print #1, Chr$(&H1B); "@" ' reset
    Print #1, Chr$(&H1B); "R"; Chr$(3); ' Set UK symbols on

'How to print NVRAM images stored using the TMF Logo app
    Print #1, Chr$(&H1C) + Chr$(&H70) + Chr$(code_option) + Chr$(48); ' first two set nvram print, 3rd = image number, forth = size to print

'Paper move to cut position and cut
    Print #1, Chr(&H1D) + Chr(&H56) + Chr(&H42) + Chr(&HFF) ' move paper up and cut

'Drawer one kick (some printers have more the than drawer they can kick)
    Print #1, Chr$(&H1B); Chr$(&H70); Chr$(&H0); Chr$(&H19); Chr$(&HFA); ' Drawer one kick

'Close COM connection
    Close #1

I have a load more commands such as changing the font, turning bold, underline, etc on and off, but if ya want them, just reply and I'll ad em.

Anyway, hope it helps someone as it took me ages to figure out.


Old May 20th, 2007, 10:09 AM
Registered User
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Please send some more info on Fonts etc.. trying to get hold of them on the net is difficult.

Thank You.

Old June 18th, 2007, 04:56 PM
Registered User
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sfroger2002

Hello guys, I want to get data from a scale with serial port connection rs232. I´m planning using excel VBA for this procedure but I don´t know the right code. Please, coult you give me an example for read the serial port and put the informations directly in excell cells? Thanks a lot. :)

R. Ferreira
Old July 22nd, 2008, 07:07 PM
Registered User
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to programmer.cse

Hi all , could anybody tell me how can i control & access the Electronic Cash Register memory from PC? I need the commands in java/c or c# or any language. I would like to input the cash register from pc keyboard, & also want to retrieve the data stored in the cash register memory.If you know , plz plz plz help me .

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cash Register arcadium Java GUI 0 August 2nd, 2008 10:24 PM
accessing Electronic Cash Register memory programmer.cse BOOK: Excel 2003 VBA Programmer's Reference 0 July 23rd, 2008 03:53 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Cash Register web form activexcode Classic ASP Basics 4 October 3rd, 2004 05:01 AM
Code depending on Register Globals char Beginning PHP 2 July 31st, 2003 11:45 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.