Print button to auto print a form

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
830
Office Version
  1. 365
Platform
  1. Windows
I have created a print button that when clicked will print a specific form. The problem that I am having is that it prints a copy of the form for each record that I have in my database. I just need a single copy.

Is there a way to force the print button to only print a single copy of this form? By the way, this form has no data from my database. It just contains data labels.

Here is the code that I am currently using.

Private Sub Print_Blank_Click()
On Error GoTo Err_Print_Blank_Click

Dim stDocName As String

stDocName = "Blank Work Order"
DoCmd.OpenReport stDocName, acNormal

Exit_Print_Blank_Click:
Exit Sub

Err_Print_Blank_Click:
MsgBox Err.Description
Resume Exit_Print_Blank_Click

End Sub


Thanks,
Matthew
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
If the report is printing multiple times then it must be using data from your db :)

try opening the record source for the report and seeing how many records it shows

Peter
 
Upvote 0
bat17,

I deleted all of the fields within the report and recreated each label. When I view the report, it shows me exactly what I want, but there is a copy of the blank report in the print preview for every record that is in my database but it is not showing any real data from the database.

Still confused?
Matthew
 
Upvote 0
I figured it out. I created a new blank report and then copied all of my text labels from the screwed up one to the new one.

All is well.

Thanks for your help.

Matthew
 
Upvote 0

Forum statistics

Threads
1,221,810
Messages
6,162,108
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top