Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I export data using Select Query with Parameters in Access 2000

Status
Not open for further replies.

capi

Programmer
Jun 11, 2001
1
US
I built a table in Access 2000 which contains my organization's members, and the branch they attend. I created a Select Query which uses a Parameter to ask the user to enter the specific branch desired, and then displays the desired data on screen. This all works properly.

The problem I am having is when I want to export the screen data to a file. I'll select FILE --> EXPORT, then select the file's "Save as type" as a .csv text file. When I click on the "Save All" button, I get the error message from the Export Text Wizard : "Too few parameters. Expected 1."

If I do not use a parameter to ask for/prompt for the branch, and instead hardcode the desired branch in the "Criteria" field, the export will work without problems.

I have looked in the Access on-line documentation, and in all the Access books I have. I have changed the "Criteria" field from: [WHAT Branch-ID], which was the 1st way I prompted/accepted the branch, to defining the Select Query Parameter to be "Branch-ID" with "Type" equal to "Long Integer". One of the books recommended this, but it still does not work.

Any help will be appreciated. Thanks in advance!!
 
You could use a macro instead. Set the macro action to TransferText, and specify ExportDelimited as the transfer type. When you export this way, the dialog box asking for the parameter will be shown. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top