Microsoft KB Archive/262837

= ACC97: &quot;Too few parameters. Expected 1&quot; Error Message When You Export Parameter Query as Text =

Article ID: 262837

Article Last Modified on 1/27/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q262837



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you export a parameter query as a text file, you may receive the following error message, where X is the number of parameters in the query:

Too few parameters. Expected X.



RESOLUTION
To work around this issue, create a SQL statement similar to the SQL statement created in the following steps:  Open the sample database Northwind.mdb. In the Database window, click the Employees table, click Insert, and then click Query. In the New Query dialog box, click OK. On the View menu, click SQL View. Type the following SQL statement:

SELECT * INTO [Text;FMT=Delimted;HDR=Yes;DATABASE=C:\;].[Employees#txt] FROM Employees WHERE [EmployeeID] = [Enter an EmployeeID];

 Save the query as Query1.</li> On the Query menu, click Run. Note that a text file named &quot;Employees.txt&quot; was created on drive C, and that it contains only the data for the EmployeeID that you entered in the parameter box.</li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> Open the sample database Northwind.mdb.</li> In the Database window, click the Employees table, click Insert, and then click Query.</li> In the New Query dialog box, click OK.</li> Double-click EmployeeID in the field list to add it to the query design grid.</li> In the Criteria row of the query design grid, under EmployeeID, type the following criteria:

[Enter an Employee ID]

</li> Save this query as Query1.</li> On the Query menu, click Run. Type a valid EmployeeID and note that one record is returned.</li> On the File menu, click Save As/Export. Click To an External File or Database, and then click OK.</li> In the Files of type list, click Text Files, and then click Export. Note that you receive the error message mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

Additional query words: too few parameters expected 1 2 3 4 5 6 7 8 9 0

Keywords: kberrmsg kbprb KB262837

-

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

© Microsoft Corporation. All rights reserved.