Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Address Util.

Status
Not open for further replies.

rpbenito

Programmer
Jun 13, 2001
63
US
I'm making a utility for an access 2000 database that prints out a persons name and address on labels. I am having trouble getting a format to get it in this format...


Name
Address
cite,state zip

All the name, address, etc. are fields in a table.. any ideas would be of great help...thanks a lot
 
Have you tried the Report Wizard for labels?

One of the few wizards worth the name. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Alternatively

Create Query to source you label run


and add following in a column

LBL: [Name] & Chr$(13) & Chr$(10) & [Address]& Chr$(13) & Chr$(10) & [city] & ", "& [state] & ", " & [zip]

This should will give you the desired layout

NB When you look at the result set generated by the Query don't forget to expand the the height of the record as it will only display the first line.

regards

jo
 
Rather than using the Chr() strings for including a hard line return, you can just include a return inside quotes (using Crtl-enter...or is that Alt-enter? - I cant remember!)

It makes it easier to read.

I also often use iif() statements to ensure that unneccesary blank lines are not added, such as when address line 2 is blank:

iif(isnull(Address1),null,address1 & "
") & iif(isnull(address2), null,address2 & "
") & city & " " & postcode

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top