Solved

Problem Printing Envelopes in Access 2007

Posted on 2010-09-07
3
399 Views
Last Modified: 2012-06-27
I am trying to print envelopes in Access 2007 using a report that has its page properties set to be the same size as  a #10 envelope.  This is working fine except for the fact that the fields are not lining up very well.  Because some names are much longer than others, and some addresses have an additional second line with a suite number for example, I can't seem to get everything formatted in such a way that it looks normal.


I would like to have the addresses look like this:


John Doe
123 Anywhere Street
Suite 100
Nashville, TN 12345



Instead it looks like:


John          Doe
123    Anywhere       Street
Suite   100
Nashville,       TN      12345


Any help would be appreciated.
0
Comment
Question by:apsonline
3 Comments
 
LVL 7

Accepted Solution

by:
shaydie earned 125 total points
ID: 33622754
Use unbound text boxes on your report and add multiple fields together into one text box something like this:
=[FirsName] & " " & [LastName]
=[AddressPart1] & " " & [AddressPart2]
=[City] & ", " & [State] & " " & [ZipCode]

set the control source something like that replacing the actual field names from your data.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 33623202
or you could merge the fields in the underlying query.

SELECT [FirstName] & " " & [LastName] as FullName,
             [AddressNumber] & " " & [StreetName] & " " & [StreetType] & chr$(10) & chr$(13) & [AddressPart2] as Address,
             [City] & ", " & [State] & "  " & [Zip] as CityStateZip
FROM yourTable

Using this method, you only need three controls (txtFullName, txtAddress, txtCityStateZip).  Set the CanGrow property of txtAddress to Yes.  Using chr$(10) & chr$(13) should provide for wrapping the second part of the address to a second line.
0
 

Author Closing Comment

by:apsonline
ID: 33626413
This worked great; thank you
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 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