S
StuJol
i have a table named "PrintPageSetup", with two columes
Number Name
19 Envelope #9 (3.875 x 8.875 in.)
20 Envelope #10 (4.125 x 9.5 in.)
21 Envelope #11 (4.5 x 10.375 in.)
22 Envelope #12 (4.25 x 11 in.)
29 Envelope DL (110 x 220 mm)
31 Envelope C6 (114 x 162 mm)
I have a print dialog form where you select one of the above paper sizes
from a combo box named "cmbPageSetup" and the following code in the combo box
after update control
Private Sub cmbPageSetup_AfterUpdate()
DoCmd.OpenReport "Envelope", acViewDesign, , , acHidden
With Reports(Envelope).Printer
.PaperSize = Forms![Envelope]!cmbPageSetup
.LeftMargin = 2000
End With
End Sub
When you select a envelope size from the combo box a report named "Envelope"
opens, resizes it self and closes. The problem i have is that not all
printers support all envelope sizes. is it possible to get vba to look at the
default printer settings when the database first opens and copies the default
printer paper types to the "PrintPageSetup" table? so when a user selects the
combo box only paper sizes that there default printer supports in shown??
Thank you to anyone who looks into this.
Number Name
19 Envelope #9 (3.875 x 8.875 in.)
20 Envelope #10 (4.125 x 9.5 in.)
21 Envelope #11 (4.5 x 10.375 in.)
22 Envelope #12 (4.25 x 11 in.)
29 Envelope DL (110 x 220 mm)
31 Envelope C6 (114 x 162 mm)
I have a print dialog form where you select one of the above paper sizes
from a combo box named "cmbPageSetup" and the following code in the combo box
after update control
Private Sub cmbPageSetup_AfterUpdate()
DoCmd.OpenReport "Envelope", acViewDesign, , , acHidden
With Reports(Envelope).Printer
.PaperSize = Forms![Envelope]!cmbPageSetup
.LeftMargin = 2000
End With
End Sub
When you select a envelope size from the combo box a report named "Envelope"
opens, resizes it self and closes. The problem i have is that not all
printers support all envelope sizes. is it possible to get vba to look at the
default printer settings when the database first opens and copies the default
printer paper types to the "PrintPageSetup" table? so when a user selects the
combo box only paper sizes that there default printer supports in shown??
Thank you to anyone who looks into this.