Importing Data from Access -- Parameter Errors

J

jwr

I am attempting to import a query from access. I get to the point of view
or saving query in excel and get message "Too few parameters, expected 4."

There are several parameters in my query.

How do I avoid this message and get my query into excel?
 
C

Conrad Carlberg

Does your query work properly if you invoke it directly in Access? And must
the user supply the values of the parameters directly, or can those values
be picked up from a worksheet?

I assume you're using Microsoft Query to return the data from Access.
Microsoft Query is not as powerful as Access (and thus any other true
relational database) and sometimes it doesn't respond to SQL as you'd
expect. If you're using Microsoft Query to help define your query, for
example using selection criteria, you might try putting the criteria in the
Access query rather than in Microsoft Query. The less you leave to Microsoft
Query, the better. In particular, if you are using any sort of complex table
joins, you should make sure to manage them in the Access query, not in
Microsoft Query.

The last time I ran into what you describe, it was caused by a combination
of restricting records based on a selection criterion, and then further
restricting them on the basis of inner joins. The only way I was able to
solve it was to use VBA to execute two separate queries, each returning a
progressively smaller recordset. This stuff can get very complex.
 
J

jwr

Yes the query works, but does ask for values of the parameters to be input.

I was using Microsoft query when I got "expected parameters".

Briefly - what I am attempting to do is --

I have an access database. I have a query and a report based upon that
query. I need to send via email the report for the end user to input
information into several "unprotected" fields and then have them email that
back to me. Access does not email reports in the same format so I have been
trying to find another way to get information emailed from access. Excel
template was my next try.

Thanks,
JR
 

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