ACC2002: Can't Expand a Table's Subdatasheet (287476)
The information in this article applies to:
This article was previously published under Q287476 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
You are unable to expand subdatasheets in a table's datasheet view when you use a function as the source object for the subdatasheet.
CAUSE
This behavior can occur because functions cannot be used as source objects for subdatasheets in tables.
RESOLUTION
To work around this issue, use either of the following methods.
Method 1: Use a View as the Subdatasheet's Source Object
To do this, follow these steps:
- Create a view that selects the same data as the function that you have been using as the source object for your primary table's subdatasheet.
- Open your primary table in Design view and display the property sheet.
- In the Subdatasheet Name box on the Data tab, select the view that you created in step 1.
Method 2: Use a Form and Subform in Datasheet View
To do this, follow these steps:
- Create a new form based on the function that selects your subdatasheet data, make its default view Datasheet view, and then save it as FormSub.
- Create a second new form based on your primary table, make its default view Datasheet view, and then save it as FormMain.
- Open FormMain in Design view.
- In the Database window, select the form FormSub, and then drag it onto the Detail section of the form FormMain.
NOTE: You must drag the subform into position in this step; using the Subform/Subreport wizard does not work in this case. - Display the property sheet, and then set the Link Child and Link Master fields appropriately.
- Save the form, and then open it in Datasheet view.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbbug kbnofix KB287476 |
---|
|