ACC: Can't Enable Pages Option Button in CommonDialog Control (174002)
The information in this article applies to:
- Microsoft Access 97
- Microsoft Office 97 Developer Edition
This article was previously published under Q174002 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
The Pages option button of the CommonDialog ActiveX control remains
disabled when you set the Flags property to the cdlPDPageNums constant.
RESOLUTION
You must set the Max property of the CommonDialog control to a value
greater than 0, and greater than the value of the control's Min property.
To enable the Pages option button, follow these steps:
- Follow steps 1 through 6 of the "Steps to Reproduce" Section later in
this article.
- Set the command button's OnClick property to the following event
procedure:
Private Sub Command1_Click()
Dim cd As CommonDialog
Set cd = Me!CmnDlg.Object
With cd
.Flags = cdlPDPageNums
' Allow a page range of 1 - 50 to be entered in
' the dialog box.
.Min = 1
.Max = 50
' Default the From box to 1, and the To box to 50.
' Note that the FromPage property must be greater than or
' equal to the Min property, and the ToPage property
' must be less than or equal to the Max property.
.FromPage = 1
.ToPage = 50
.ShowPrinter
End With
End Sub
- Open the form in Form view.
- Click the command button.
Note that the Pages option button and associated edit controls are
enabled, and the page range is set from 1 to 50 by default.
REFERENCES
For more information about the Common Dialog control, search the Help Index
for "CommonDialog control," or ask the Microsoft Access 97 Office
Assistant.
For more information about using the Max property with the Common Dialog
control, search for "Max property," and then "Max, Min Properties
(CommonDialog)" using the Help Index.
Modification Type: | Major | Last Reviewed: | 10/20/2003 |
---|
Keywords: | kbprb KB174002 |
---|
|