Microsoft KB Archive/153467

= ACC2: "Fill Specification Grid from Table" Causes Fatal Error =

Article ID: 153467

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q153467



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you click the "Fill Specification Grid from Table" button when you are exporting a fixed-width text file using the DoMenuItem action, you may receive the following error message:

An Error has occurred in your program. To quit this program click Close. You will lose information entered since your last Save.



CAUSE
The Database window did not have the focus when the DoMenuItem action was carried out.



RESOLUTION
Before issuing the DoMenuItem command that starts the export process, set the focus to the Database window. The following example demonstrates how to use a SelectObject macro action to set the focus to the Database window:   Macro Action ---  SelectObject Object Type: Macro Object Name: Autoexec In Database Window: Yes Be sure that the Object Type and Object Name refer to an existing object in your database. The In Database Window argument must be set to Yes.



Steps to Reproduce Behavior
 Open the sample database NWIND.MDB.  Create the following new macro:      Macro Name    Macro Action --     TestExport    DoMenuItem

TestExport Actions -        Menu Bar: Database Menu Name: File Command: Export  Create a new blank form called TestExport. Add a command button to the form and set the OnClick property to the TestExport macro. View the TestExport form in Form view and click the command button to run the TestExport Macro.</li> In the Export dialog box, select Text (Fixed Width), and then click OK.</li> In the "Select Microsoft Access Object" dialog box, select the Customers Table, and then click OK.</li> In the Export To File dialog box, click OK.</li> In the Export Text Options dialog box, click the Edit Specs button, and then click the "Fill Specification Grid from Table" button. Note that you receive the error message described in the "Symptoms" section.</li></ol>

Additional query words: GPF ADT fixed-width export

Keywords: kbinterop kbprb KB153467

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.