Select and print certain lables

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

Guest

I have a database with multiple names and personal info. I've isolated the
info i want to print, however it prints everyone in the database. I know I
can set it up to select only certain people by a particular field but I don't
know how to do it. Say I want to print info on 10 people, I want to be able
to put in those 10 SSAN and print lables on just those individuals.
 
I have a database with multiple names and personal info. I've isolated the
info i want to print, however it prints everyone in the database. I know I
can set it up to select only certain people by a particular field but I don't
know how to do it. Say I want to print info on 10 people, I want to be able
to put in those 10 SSAN and print lables on just those individuals.

How is Access supposed to know which 10 records to print?

Add a check box field to your table. Name it "Selected".
Add this "Selected" check box field to your form.
Add a command button to your form.
Code it's Click event:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "LabelReportName", acViewPreview, , "[Selected] = -1"

Then select those records you wish to print by placing a check in this
Selected control.

Only records that have been checked will be in the report.

After the report is printed, clear all of the check marks.
Add another command button. Set it's click event to:

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

Change YourTable to whatever the actual table name is.
 

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

Back
Top