Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 223248 - Last Review: June 29, 2004 - Revision: 2.0
ACC2000: PreviousSection Property Causes Microsoft Access and Internet Explorer to Quit Unexpectedly
This article was previously published under Q223248
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
Microsoft Access or Microsoft Internet Explorer unexpectedly quits when you browse to a data access page that tries to reference the
PreviousSection property.
Avoid using programming code that references the
PreviousSection property.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem only occurs when you try to access the
PreviousSection property on a grouped or banded data access page, but only when the group contains no matching records. If the group you are viewing contains one or more matching records, the
PreviousSection property can be successfully accessed.
Steps to Reproduce the Behavior
- Create a new database.
- Import the following two tables from the sample database Northwind.mdb:
Categories
Products
- Create a new query by using the following SQL statement, and then run the query:
DELETE *, CategoryID FROM Products WHERE CategoryID=8;
- Click Yes to deleted the specified records, and then close the query without saving it.
- Click Pages in the Database window, and then double-click Create data access page by using wizard.
- In the Page Wizard, click Table: Products under Table/Queries, click the >> button to select all fields, and then click Finish.
- In Design view of the new data access page, expand Tables, and then expand Categories in the field list.
- Drag the CategoryID field and hold it directly above the bar that is labeled Header: Products. After you see a blue line with inward pointing arrows, release the mouse button. This creates a text box in a new section called Header: Categories.
- On the View menu, click Sorting and Grouping, and for the Categories group, set Group Footer to Yes.
- Close the Sorting and Grouping dialog box, and note the new section called Footer: Categories. Add a command button to this section.
- Assign Test to the ID property of this button.
- Click the bar labeled NavigationSection: Products, and then press DELETE to remove this section.
- Start Microsoft Script Editor, and then in the Script Outline, expand Test, and double-click onclick.
- Enter the following script:
<SCRIPT event=onclick for=Test language=vbscript>
<!--
Dim MySection
Set MySection = MSODSC.CurrentSection
Set MySection = MySection.PreviousSection
-->
</SCRIPT>
- Close the Script Editor and when you are prompted to save changes, click Yes, saving the page as Page1.htm.
- Switch to Page view and note that there are categories 1 through 8. If you expand any of the first 7 categories, you see the products that match that category, and you can successfully click the button that references the PreviousSection property.
If you go to category 8, note that the Expand button for category 8 will still switch from Plus to Minus, even though there are no matching products. As long as you have category 8 collapsed, you can click the button and successfully set the MySection variable to the PreviousSection property. But if you expand category 8 and then click the button, Access appears to to stop responding (hang), and will then shut down completely.
APPLIES TO
- Microsoft Access 2000 Standard Edition
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate