Results 1 to 2 of 2
  1. #1
    scorpion99 is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Nov 2013
    Posts
    27

    Import query having parameters from excel


    Hello,
    I have a query in access that asks about DateFrom and DateTo as Parameters once executed.
    Now , I want to import this query in excel but I need to create two cells named From , To and a button named Submit where I can enter the values above and got the results.Probably it is a VBA codin, can anyone help?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You want to export an Access query to an Excel workbook? The query has DateFrom and DateTo as parameters under a date field to filter the records? You want those two values in worksheet cells?

    Try this query:

    SELECT *, [enter date from] As DateFrom, [enter date to] As DateTo FROM table WHERE [date field] BETWEEN [enter date from] AND [enter date to];

    I recommend the parameters be reference to controls on form to better manage input validation. I never use dynamic parameter input popup.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import access query data into excel file, using excel vba
    By exceljockey in forum Import/Export Data
    Replies: 3
    Last Post: 11-15-2013, 02:36 PM
  2. Query used to import data from access > excel
    By Perceptus in forum Queries
    Replies: 1
    Last Post: 07-25-2013, 10:45 AM
  3. Replies: 3
    Last Post: 05-23-2013, 12:17 PM
  4. Replies: 4
    Last Post: 12-17-2012, 01:21 PM
  5. Import Excel sheet with query
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-03-2010, 07:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums