Microsoft KB Archive/269671

= ACC2000: &quot;Too Few parameters. Expected X&quot; Error Message When You Export Parameter Query as Text =

Article ID: 269671

Article Last Modified on 6/25/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q269671



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

This article applies only to a Microsoft Access database (.mdb).



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 behavior, create a SQL statement similar to the SQL statement that is created in the following example:  Open the sample database Northwind.mdb. In the Database window, click the Employees table, and on the Insert menu, click Query. In the New Query dialog box, click OK. On the View menu, click SQL View. Type or paste 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. Type a valid EmployeeID, and then click Yes in the dialog box that asks if you want to create a new table.

Note that a text file named &quot;Employees.txt&quot; is 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, and then on the Insert menu, click Query.</li> In the New Query dialog box, click OK.</li> Double-click EmployeeID, LastName, and Title in the field list to add the fields 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 the 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 Export.</li> In the Files of type list, click Text Files, and then click Save All. Note that you receive the error message mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

Additional query words: prb to few parameters expected x 1

Keywords: kberrmsg kbprb KB269671

-

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

© Microsoft Corporation. All rights reserved.