chris_huh wrote:
Using the Label Wezard you can easily make labels for all the records
in the table, but is there a way to make just one.
I have a form that shows the data from a single recordset and on that
form i have a button that i need to be able to link to a label for
just that records data.
How can you get the ID for that record to be passed to the label
report so that only that one is shown.
Also, i don't know if it is possible, but is there a way to allow the
user to select the label to print (i.e. where on the page the label
will print) so as to save paper?
You use the optional Where argument of the OpenReport method to filter the
report to just the record you want.
DoCmd.OpenReport "reportName",,,"SomeField = SomeValue"
You can create a query that is a union of your table and a dummy table that
contains matching fields to your table (all empty) and one additional field with
an incrementing number. It should have one less rows than you have labels per
sheet. You set up the query so the blank records from the dummy table are
sorted to the top. Then applying additional criteria on the numeric field you
can control how many blank rows the query contains. If you apply criteria to
return three blank rows the real data will start on the fourth label etc..
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com