+ Reply to Thread
Results 1 to 2 of 2

too few parameters

  1. #1
    lou sanderson
    Guest

    too few parameters

    Microsoft Excel 2002 SP-2, Microsoft Windows XP professional

    I have my queries written in MS Access, and I pull the results into Excel
    via 'import external data'...'New database query'. My queries run fine in
    Access, and it works ok for most of the stuff I pull into Excel, but
    sometimes when I try to pull the results in Excel, I get an error that says
    "too few parameters expected".

    The error occurs at the very last step in the 'get external data' procedure,
    as Excel tries to connect to the datasource.

    This seems to occur most often when I have a union query somewhere in my
    Access query chain. This is extremely frustrating as I have to figure out
    ways to rewrite my queries without the union query.

    Has anyone seen anything like this before? Does anyone know why a union
    query in Access would cause such an error in Excel? Anyone know why Excel
    does this or maybe even how to fix it?

    Thanks,
    -Lou Sanderson

  2. #2
    Nick Hodge
    Guest

    Re: too few parameters

    Lou

    Parameter queries are also a problem to the ODBC drivers using MSQuery. You
    will get the too few parameters, expected 1 error if your parameter is in
    Access. Not sure about Union queries, but I overcome this by pasting the
    SQL from access into MSQuery, that seems to fix it.

    In other words, get a simple select query in Access and adapt this in
    MSQuery. Using ODBC this is your only route. If you use another datasource
    type (OLE DB or ADO.Net) then you may be able to, but that's another
    question

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    www.nickhodge.co.uk
    [email protected]HIS


    "lou sanderson" <[email protected]> wrote in message
    news:[email protected]...
    > Microsoft Excel 2002 SP-2, Microsoft Windows XP professional
    >
    > I have my queries written in MS Access, and I pull the results into Excel
    > via 'import external data'...'New database query'. My queries run fine in
    > Access, and it works ok for most of the stuff I pull into Excel, but
    > sometimes when I try to pull the results in Excel, I get an error that
    > says
    > "too few parameters expected".
    >
    > The error occurs at the very last step in the 'get external data'
    > procedure,
    > as Excel tries to connect to the datasource.
    >
    > This seems to occur most often when I have a union query somewhere in my
    > Access query chain. This is extremely frustrating as I have to figure out
    > ways to rewrite my queries without the union query.
    >
    > Has anyone seen anything like this before? Does anyone know why a union
    > query in Access would cause such an error in Excel? Anyone know why Excel
    > does this or maybe even how to fix it?
    >
    > Thanks,
    > -Lou Sanderson




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1