Solved

Printing Question

Posted on 1998-08-31
2
155 Views
Last Modified: 2011-04-14
I have to write a report which 2 pages: the first one is the customer record, and the second one is a table with all the activities of the customer in the last month(kind of a grid table). I have no problems with the first page, but when I tried to deal with second page, i could figure out how can I align and limit the size of the fields so all the rows for a specific colimn will start on the same X. I tried to use the currentX/Currenty but it didn't work.
Can someone help me, please

Alon
0
Comment
Question by:oak022097
2 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 60 total points
Comment Utility
Umm, as you print, don't advance the cursor:

Printer.print "col1";
printer.currentx = ... set to column two
printer.print "col2";

The ; at the end of the line will prevent the print cursor from advancing.

You can also force the issue:

TempY = Printer.CurrentY
Printer.Print "Col1"
Printer.CurrentY = TempY
Printer.CurrentX = Col2X
Printer.Print "Col2"

Same technique lets you right align. Say you had to print something at 5" that would
place you at 7220 twips in from the left.

txt = "Text to print Right"
Printer.CurrentX = 7220 - text.width(txt)
Printer.Print Txt

etc.

Remember text prints DOWN and to RIGHT of CurrentX/CurrentY and that there are 1440 twips in one inch. (1 inch = 6 Picas = 72 Points = 1440 Twips)

0
 
LVL 14

Expert Comment

by:waty
Comment Utility
You could use my Print Preview OCX. It does everything :

 Web Site : http://www.geocities.com/ResearchTriangle/6311/
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now