Solved

Printing Question

Posted on 1998-08-31
2
156 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
ID: 1432155
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
ID: 1432156
You could use my Print Preview OCX. It does everything :

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

863 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

20 Experts available now in Live!

Get 1:1 Help Now