Printing codes

  • Thread starter Thread starter Rolf Rosenquist
  • Start date 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
 
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.
 
Back
Top