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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATING LABELS

Status
Not open for further replies.

villica

Programmer
Feb 25, 2000
332
0
0
CA
I have a customer database and I would like to create some labels only for certain records.<br>For example print labels from record #100 to 120. I have worked with Alpha 4 before and I had this optiont. I was wondering if there is a way on doing this in access 97. I tried to create the labels using&nbsp;&nbsp;the label wizard but I am wondering if there is way of putting the code into a button on a form and allow the user the select which records do they want labels for. Any sort of help would be very much appreciated.<br><br><br> <p>Villica<br><a href=mailto:villica67@hotmail.com>villica67@hotmail.com</a><br><a href= > </a><br>
 
I think that one of the easiest ways to accomplish your task is to write your sql statement to use &quot;in&quot; as your operator. An example would be....<br><br>SELECT employee.number, employee.name, employee.salary,&nbsp;&nbsp;&nbsp;&nbsp;employee.manager<br>FROM employee<br>WHERE employee.manager IN (7902, 7566, 7788);<br><br>This select statement would select all managers in the table that have a managers ID or 7902, 7566, 7788. You can substitute you criteria and hopefully this will work.
 
I would add a field to your database (PrintMe) that is a Yes/No field.<br>So if you want to print labesl for anyone just check the box<br>then construct your SQL so it looks at whether the box is checked or not<br>So you can easily change the printed ones as necessary.<br><br>SELECT employee.number, employee.name, employee.salary,&nbsp;&nbsp;&nbsp;&nbsp;employee.manager<br>FROM employee<br>WHERE Printme = -1;<br><br><br>
 
If the records are in order you can use the &quot;between&quot; operator in your criteria selection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top