2 Questions

generically

New Member
Joined
Nov 28, 2002
Messages
23
I was hoping that someone will be able to help with this one. I have 2 questions actually.

1) I have the below macro to print out a query from a form. But what I need to do is have it print out the first one. I have it set up to display the hightest numbered one.

Private Sub print_Click()
On Error GoTo Err_print_Click

Dim stDocName As String

stDocName = "list Query"
DoCmd.OpenReport stDocName, acNormal

Exit_print_Click:
Exit Sub

Err_print_Click:
MsgBox Err.Description
Resume Exit_print_Click

End Sub


2) In the same form I have a sub form that is continuos. When I go to print the form I get each line of the sub form on a different sheet

Thanks for the help
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Tanis

Active Member
Joined
Dec 8, 2002
Messages
305
How are you determining the first one? Would it not be simpler to pick the record to print? When you say each line, do you mean each record?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,316
Members
414,053
Latest member
Dual Showman

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
Top