Hello,
Ok, here is the situation. I have a database, which loads contracts, and payments, then produces a report for each contract. I have a multi-select listbox that lists each contract in the main table. The user clicks to select the desired contracts, in the listbox, then clicks a button to run a report for all selected contracts. There are 16 different reports. Each contract record has two field values that determine which report is opened.
For Each ContNum In Me.ContList.ItemsSelected
Select Case Me.ContList.Column(3, ContNum)
Case 1
If Me.ContList.Column(4, ContNum) = 1 Then
Let RptType = "Report 1"
End If
If Me.ContList.Column(4, ContNum) = 2 Then
Let RptType = "Report 2"
End If
…(etc.)
Case 2
…(etc.)
End Select
DoCmd.OpenReport _
ReportName:=RptType, _
View:=acViewNormal, _
WhereCondition:="[Contract Number] = " & _
Chr(34) & Me.ContList.Column(1, ContNum) & Chr(34)
Next
I’ve tried using the (Docmd.RunCommand acCmdPrint) method, which opens the printer dialog box. This allows the user to change printers, but it prints a copy of the form to the selected printer, then prints all the reports to the default printer.
I need a way to prompt the user to select a printer, then print every report to that printer.
Is there a way to display the available printers in a listbox, then set Access’s default printer to the value selected in the listbox? (then change it back after printing?)
Or maybe print the reports to a (spooler?), or something, then select a printer and print all the reports as one print job?
Any suggestions?
Please let me know,
Thank you,
Blair
Ok, here is the situation. I have a database, which loads contracts, and payments, then produces a report for each contract. I have a multi-select listbox that lists each contract in the main table. The user clicks to select the desired contracts, in the listbox, then clicks a button to run a report for all selected contracts. There are 16 different reports. Each contract record has two field values that determine which report is opened.
For Each ContNum In Me.ContList.ItemsSelected
Select Case Me.ContList.Column(3, ContNum)
Case 1
If Me.ContList.Column(4, ContNum) = 1 Then
Let RptType = "Report 1"
End If
If Me.ContList.Column(4, ContNum) = 2 Then
Let RptType = "Report 2"
End If
…(etc.)
Case 2
…(etc.)
End Select
DoCmd.OpenReport _
ReportName:=RptType, _
View:=acViewNormal, _
WhereCondition:="[Contract Number] = " & _
Chr(34) & Me.ContList.Column(1, ContNum) & Chr(34)
Next
I’ve tried using the (Docmd.RunCommand acCmdPrint) method, which opens the printer dialog box. This allows the user to change printers, but it prints a copy of the form to the selected printer, then prints all the reports to the default printer.
I need a way to prompt the user to select a printer, then print every report to that printer.
Is there a way to display the available printers in a listbox, then set Access’s default printer to the value selected in the listbox? (then change it back after printing?)
Or maybe print the reports to a (spooler?), or something, then select a printer and print all the reports as one print job?
Any suggestions?
Please let me know,
Thank you,
Blair