Too Few Parameters Error During an Export

P

Pete August

I am attempting to use the File - Export function to save the results of a
query into a text file. The query does have two input parameters, but when I
try to export to a text file I receive a "Too Few Parameters" error. I am
only prompted for the parameters when I first run the query.

Can I still use the File - Export function , or would a marco be a better
choice?
 
K

Ken Snell [MVP]

You will not be prompted for the parameters when you do the export manually
(via File | Export).

You will be prompted for them if you use a macro to run the TransferText
action.
 
P

Pete August

Ken,

But when I use File | Export - to a text file. I receive the "Too Few
Parameters error, and I cannot get past the error" Is there a way to retain
the Parameters used by the query, but still do an export w/o having to
re-prompt for the parameters?
 
K

Ken Snell [MVP]

My apology for confusing you. What I meant by my post was to confirm what
you're seeing when you try to do the manual export. You will get the error
message that you're seeing.

However, if you use a macro (TransferText) or VBA code (DoCmd.TransferText)
to do the export, the query will ask you to provide the parameters and then
will do the export. You will not see the error message that you're now
seeing with the manual method.

--

Ken Snell
<MS ACCESS MVP>
 
T

tmj00345

I am once again piggy-backing on another message thread, because although I
sign on with my password, and am recognized by the system, it does not allow
me to post a new question.

I too am getting the "too few parameters" error -- specifically "too few
parameters. expecting 1". This is when refreshing an Excel pivot table
worksheet. But here's my problem: the MS Access query used to populate the
pivot table has no parameters. None show up when I list parameters for the
query. None are asked for when I execute the query directly, and it indeed
executes just fine.

I muddled through this problem once before, but can't remember how. So why
is Excel giving me that message on a query that has no parameters? And next,
how do I get around it?

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top