ACC2002: Some Fields Do Not Appear in the PivotTable or PivotChart Field List of Forms (282387)
The information in this article applies to:
This article was previously published under Q282387 Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you view a form in PivotTable view or PivotChart view, some fields are not displayed in the PivotTable or PivotChart field list.
CAUSE
There are three possible causes of this behavior: - There are no controls on the form that are bound to the field.
- There is a control bound to the field on the form, but the Visible property for that control is set to No.
- The field's column width is set to 0 in the form's datasheet view.
RESOLUTION
Make sure that the form contains at least one control that is bound to the field, and make sure the control's Visible property is set to Yes. Also make sure that the column is not hidden in datasheet view of the form. To unhide a column in datasheet view, follow these steps:
- In the Database window, under Objects, click Forms, and then click the form that is based on a table with hidden fields.
- Click the Open button in the Database window.
- On the View menu, click Datasheet View.
- On the Format menu, click Unhide Columns.
- In the Unhide Columns dialog box, select any field that you want to include in the PivotTable view or PivotChart view of the form, and then click Close.
- On the View menu, click PivotTable View.
The field that is hidden in the underlying table is now visible in the field list for the PivotTable view of the form.
Additionally, you can programmatically unhide the field to the Pivot view field list. For example, this would be useful if you desired to make the field available in the Pivot views, but wanted it hidden in other views of the form. To programmatically unhide a field in the PivotTable or PivotChart field list, follow these steps: - Follow steps 1 - 6 of the "Steps to Reproduce Behavior" section of this article. Notice that after you open the form in PivotTable view, the EmployeeID field is not available in the PivotTable Field List.
- On the View menu, click Design View.
- On the View menu, click Code to view the form's module.
- On the Tools menu, click References.
- Click to select the Microsoft Office Web Components 10.0 check box. If you do not see this entry listed, click the Browse button, and select the file OWC10.DLL, located in the folder C:\Program Files\Common Files\Microsoft Shared\Web Components\10.
- Click OK to close the References dialog box.
- Add the following code to the form's module:
Private Sub Form_ViewChange(ByVal Reason As Long)
Dim pTable As OWC10.PivotTable
'Only run when the user switches into PivotTable
'or PivotChart view
If Reason = plViewReasonSetFocus Or Reason = -1 Then
Set pTable = Me.PivotTable
With pTable.ActiveView
.FieldSets("EmployeeID").DisplayInFieldList = True
End With
End If
End Sub
- On the File menu, click Close and Return to Microsoft Access.
- On the View menu, click PivotTable View.
The EmployeeID field is available in the PivotTable Field List.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCESFor more information about PivotTable and PivotChart views of forms, click Microsoft Access Help on the Help menu, type Features that aren't available in Access 2000 in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 11/6/2003 |
---|
Keywords: | kbbug kbpending KB282387 |
---|
|