Printing Labels (continued)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For some reason I could not find the "Reply" button to reply to my previous
post.
It was helpful up to a point.
fredq gave me code which started the printing from the designated spot,
however, what I want is to only print (for example) label 8 which is on a
sheet of 30 labels.
This way I only print that name I want,
The code fredq gave me started at label 8 and continued the rest of names.
So thank you fredq and if you can help me to print only one label, that
would be great.
 
For some reason I could not find the "Reply" button to reply to my previous
post.
It was helpful up to a point.
fredq gave me code which started the printing from the designated spot,
however, what I want is to only print (for example) label 8 which is on a
sheet of 30 labels.
This way I only print that name I want,
The code fredq gave me started at label 8 and continued the rest of names.
So thank you fredq and if you can help me to print only one label, that
would be great.

Whenever you wish to print just one of several records in ANY report,
you should always filter out the unwanted records before opening the
report.
You haven't stated how you determine which record you want to print.

An easy method is to add a check box field to your underlying table.
Include that check box in your form.
Add a command button to your form.
Code it's click event:

DoCmd.OpenReport "ReportName", acViewPreview, , "[CheckBoxName] = -1"

The above will first preview the report. If you wish to print
directly, without first previewing the report, use:

DoCmd.OpenReport "ReportName", , , "[CheckBoxName] = -1"

When you wish to print a label for "Joe Smith" and/or "Mary Jones",
place a check in that persons check box.
Then click the command button.
Only those records that have a check in them will be displayed.

After printing, you can use another command button to remove all of
the checks so that you're ready for the next time.

CurrentDb.Execute "Update YourTable Set YourTable.CheckBoxField =
0;",dbFailOnError
 
I think I found a way. For my purposes, if I want to print John Doe, I
isolated it through a query, then, on a sheet of labels, I used the code you
gave me to print the specific label by entering skip "11" and John Doe would
print on the 12th label which is where I wanted it to print. So your code,
indeed was helpful.

fredg said:
For some reason I could not find the "Reply" button to reply to my previous
post.
It was helpful up to a point.
fredq gave me code which started the printing from the designated spot,
however, what I want is to only print (for example) label 8 which is on a
sheet of 30 labels.
This way I only print that name I want,
The code fredq gave me started at label 8 and continued the rest of names.
So thank you fredq and if you can help me to print only one label, that
would be great.

Whenever you wish to print just one of several records in ANY report,
you should always filter out the unwanted records before opening the
report.
You haven't stated how you determine which record you want to print.

An easy method is to add a check box field to your underlying table.
Include that check box in your form.
Add a command button to your form.
Code it's click event:

DoCmd.OpenReport "ReportName", acViewPreview, , "[CheckBoxName] = -1"

The above will first preview the report. If you wish to print
directly, without first previewing the report, use:

DoCmd.OpenReport "ReportName", , , "[CheckBoxName] = -1"

When you wish to print a label for "Joe Smith" and/or "Mary Jones",
place a check in that persons check box.
Then click the command button.
Only those records that have a check in them will be displayed.

After printing, you can use another command button to remove all of
the checks so that you're ready for the next time.

CurrentDb.Execute "Update YourTable Set YourTable.CheckBoxField =
0;",dbFailOnError
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top