+ Reply to Thread
Results 1 to 4 of 4

Importing Access query into Excel:Microsoft Query

  1. #1
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141

    Importing Access query into Excel:Microsoft Query

    I am using the excel to pull in an access query. I can make it work ok. The problem is I am trying to import a query that if using access asks for a start date and end date. When I try to import this query I get the following error:

    Microsoft Query:
    Too few parameters. Expected 2.

    How do I set the parameters within excel so when I try to pull the data it will work or give me the option of selecting a date range? This is my routine for doing the import in excel: Data, Import External Data, New Database Query.

    Thanks for looking!!!

  2. #2
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    re: Importing Access query into Excel:Microsoft Query

    Do the dates connstatly change or are they open to whatever you want to pull through?
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  3. #3
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    re: Importing Access query into Excel:Microsoft Query

    You could adapat the following code which uses SQL:

    Please Login or Register  to view this content.
    If you're familiar with SQL it'll be easy but if not i can try and help

    also you'd probably want to add a reference each one of the two dates so the Code pulls through the right Data.

    oh yeah you'll aslo need to ad the reference Microsoft DAO 3.6 Object libarary for it to work

  4. #4
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141

    re: Importing Access query into Excel:Microsoft Query

    The dates will change. I don't know sql either. Would I just have to change some of the references in your code to give it a go? I tried this method:
    http://www.dailydoseofexcel.com/arch...-data-queries/
    but I don't get this area: Between [Enter a start date] And [Enter an end date]. Thanks for helping.

+ 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