Solved

Printing Question

Posted on 1998-08-31
2
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Select SQL query based on a config Sheet v2 11 52
Hide vba in gp 7 116
How to set the row selection as it was prior leaving the datagrid in vb6 3 55
TT Auto Dashboard 13 101
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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

733 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