Printing codes

  • Thread starter Rolf Rosenquist
  • Start date
R

Rolf Rosenquist

When printing a on a receipt printer, I also need to send a code out to open
a cash drawer. In Basic it could be done like:
Print #1, Chr$(7);
- but how is it to be done in an Access report?

/ Rolf
 
S

SA

Rolf:

You can't do this within an Access report. They won't send characters like
that to a port or printer because it all goes through the printer driver and
spooler and gets converted to machine language.

The way you have to do this is by using VBA outside of the report. You use
the VBA commands Open and Put or Print. You open the LPT port as a file
(specifying the LPT like "LPT1" without a colon. See the help file for
more details on these commands.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top