Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: "Too Few parameters. Expected X" Error Message When You Export Parameter Query as Text


View products that this article applies to.

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).

↑ Back to the top


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.

↑ Back to the top


Resolution

To work around this behavior, create a SQL statement similar to the SQL statement that is created in the following example:
  1. Open the sample database Northwind.mdb.
  2. In the Database window, click the Employees table, and on the Insert menu, click Query.
  3. In the New Query dialog box, click OK.
  4. On the View menu, click SQL View.
  5. 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];
  6. Save the query as Query1.
  7. 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 "Employees.txt" is created on drive C, and that it contains only the data for the EmployeeID that you entered in the parameter box.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Open the sample database, Northwind.mdb.
  2. In the Database window, click the Employees table, and then on the Insert menu, click Query.
  3. In the New Query dialog box, click OK.
  4. Double-click EmployeeID, LastName, and Title in the field list to add the fields to the query design grid.
  5. In the Criteria row of the query design grid, under EmployeeID, type the following criteria:
    [Enter an Employee ID]
  6. Save the query as Query1.
  7. On the Query menu, click Run. Type a valid EmployeeID, and note that one record is returned.
  8. On the File menu, click Export.
  9. In the Files of type list, click Text Files, and then click Save All. Note that you receive the error message mentioned in the "Symptoms" section of this article.

↑ Back to the top


Keywords: KB269671, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 269671
Revision : 2
Created on : 6/25/2004
Published on : 6/25/2004
Exists online : False
Views : 320