Label Printing

Jason1

Registered User.
Local time
Today, 12:15
Joined
Mar 12, 2010
Messages
63
I want to print labels when the enter button is pressed on a data entry form. I currently have my database doing that successfully, however, the database prints one label for each record in the table that is tied to the form. I want it to print a sheet (20) labels of the record that was just entered. To clarify, the print command prints one label for each record in the table. I want it to print 20 of the same label. Any ideas on how to pull this off.

Thanks,
Jason
 
The easiest and crudest way to do this is to create a table that holds 20 records - numbers 1 - 20

Then in your query that the labels runs off, drop this table into your query but don't join the tables. What will happen is for every record found in the numbers table a contact person record will appear.

Test it in datasheet view to prove first.
 
Dcrake,

I know I sound a little special here, but I'm new to this. Could you try to be a little more "step by step" with your answer? I gave it a go, but it came up all wrong. thank you for your patience.
 
Step 1

Create a new table with 1 field in it call labelNo - Number - Integer

Save table No primary key

Step 2

Add 20 records
1
2
3
...
19
20

Step 3

Create a query that contains the fields from you other table that stores the label information

Add this new table to the query
Save the new query

Open the query and you will see that you will have 20 records for each 1 in the label info table.

Use this new query to base the label report off.
 
DCrake,

That worked great with one record in the original table, but when I added a second, it jumbled everything up. I am only going to want to print one record at a time as well. Is there something I am missing?
 
As long as you sort the records by the person name/id the order should be fine.
 
Okay,

That worked great. I really appreciate the help. One more question. I am entering these records through a form. I want to print just the one record that is being entered. Currently, If I press my print button, it prints out all the records that have been entered. It does print a sheet per record which is what I want, but I only want the current record. Is that possible?
 
You need to apply a filter to the report. Either by using open arguments or via the query.
 
Is there any way to print just the first page of the report. If I sort the labels in decending order, the newest record is always on the first page. By setting it up to only print page 1, it would always print only the newest record
 
Lets say you have the following

Form:FrmLables
Textbox:ClientId
CommandButton:CmdPrint

You open the FrmLables
You enter 123 into the ClientId
You click the CmdPrint button

The CmdPrint On click Event

DoCmd.OpenReport "RptLables",acViewNormal , , "ClientId = " & Me.ClientId

This will print out the labels for the client id 123 only
 
I have copied and pasted what you entered. I changed the file names, but I am still getting an error. I have attached screenshots of what I entered and the error. Maybe you can see what I did wrong.
 

Attachments

  • entry.GIF
    entry.GIF
    57.3 KB · Views: 119
Here is the other image
 

Attachments

  • error.GIF
    error.GIF
    46.6 KB · Views: 108
You cannot just type in the command line there. You need to open up the event procedure and place it there.

From the combo box on the event choose [Event Procedure] and then place the command line there.
 

Users who are viewing this thread

Back
Top Bottom