Good afternoon,
I have a simple contacts db and would like to add some functionalities to
it. I would like to know how I can create a button which will print an
envelop with the active records name & address. I would also like to know
how I can create label using the same principle.
Thank you very much for the help,
Daniel
Printing on an envelope is just another report.
First you must determine if your report is going to print in Portrait
or Landscape mode.
If the envelope feeds into the printer narrow side first, it will be
in Landscape.
If flap side first, portrait.
The below instructions are for Landscape.
Make a new report.
Place the Address labels at the left margin.
Size the width of the report just a bit wider than the labels.
Click File + PageSetUp + Page
Set the Paper Size property to the size of the envelope.
Since the envelope feeds in narrow side first,
set the Page Orientation to Landscape.
Then click on the Margins tab.
Set the Left and Top margins to print the address at the proper place
on the envelope.
To print on a #10 business envelope, for example, I set the Top margin
to 2.75" and the Left margin to 3" in Landscape.
Print a sample.
Readjust margin settings as needed
For Portrait mode, follow the above instructions, but, of course,
change the Page SetUp mode to Portrait, and adjust the margin settings
accordingly.
=========
To print just the address for the record shown on the form, add a
command button to the form.
Code it's click event:
DoCmd.OpenReport "EnvelopeReport", adViewPreview, , "[RecordID] = " &
Me! [RecordID]
The above assumes each record has a Unique Prime Key field of Number
datatype.
Change [RecordID] to whatever the actual prime key name is you are
using.