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
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

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?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,025
Messages
5,856,909
Members
431,837
Latest member
megantang

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