PDA

View Full Version : Printing directly to printer



Kicker
06-16-2017, 02:15 PM
Now that I am using Access 2017, I find that I cannot use some of my printing functions from VB6. Soooo, I have been looking for some help.

Using a blank sheet of paper in the printer. I need to....

1. Change fonts several times on the report
2. Select where to put certain pieces of data using twips (?)
3. Draw vertical and horizontal lines on the page

In VB6, I used something like:
Printer.Font = "Free 3 of 9"
Printer.FontSize = 20
Printer.CurrentX = 5
Printer.CurrentY = 45
Printer.Print "*" & valInvNum & "*"

But of course, it doesn't translate to VBA.

Any help would be appreciated.

jonh
06-16-2017, 03:42 PM
Why did you go from VB6 to Access? What database were you using before?
Access reports have always been rubbish IMO.

Kicker
06-16-2017, 03:47 PM
I agree.

I'm retired and belong to a Wood Working Club. They have put in a new computer system and I'm recreating a very outdated and dumb program. They installed Access 2017 (don't get me started on that) and I am completely redesigning the program.

I really don't want to create and populate a "report" and then print the report.

but, what the heck, Old Dogs can learn new tricks.

I just need to be able to send "something" to the printer and control the orientation and font. Then EndDoc or Eject the paper before going to the next one.

Thanks for your reply

jonh
06-18-2017, 09:51 AM
I really don't want to create and populate a "report" and then print the report.

I just need to be able to send "something" to the printer and control the orientation and font. Then EndDoc or Eject the paper before going to the next one.

Well if that's all you want, Access reports will probably do.
If you want complete control, build your application in .net or something.

I just use html wherever I can. It's easy to write and easy to make look good.