Results 1 to 4 of 4
  1. #1
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108

    Question How to use data from uploaded excel file and display a chart based on the query?

    Current situation:I have a graph chart and my row source type is a Query. So I retrieved data from the Query that I built.

    However , I want to get the data from the uploaded excel file.
    Any ideas how to do it?Vba?
    Thanks in advance.

    I have a form that will prompt user in the beginning to upload the excel file and replaced the old table in Access- "CrossSystemData"



    Basically , I want to pull data from Excel file , Run the query(Data from excel file) then excute to "display a chart based on my query"
    Is it possible ?


    Query SQL: "PolyWrongRegInsCount"

    Code:
    SELECT GROUPING.INSTITUTION, Count(*) AS NO_OF_GROUP
    FROM (SELECT DISTINCT CATEGORY, GROUP_NO, INSTITUTION, IIF(Left(INSTITUTION,1)="P","POLYCLINIC","HOSPITAL") AS INS_TYPE FROM CrossSystemData WHERE INSTITUTION NOT LIKE "*UNKNOWN*")  AS GROUPING
    WHERE (((GROUPING.CATEGORY)="WRONG REG") AND ((GROUPING.INS_TYPE)="POLYCLINIC"))
    GROUP BY GROUPING.INSTITUTION;
    My Chart SQL :

    Code:
    SELECT PolyWrongRegInsCount.[INSTITUTION], PolyWrongRegInsCount.[NO_OF_GROUP]
    FROM PolyWrongRegInsCount;

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you import the data via:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, tbl, File, True

    then your chart should be self updating via the query you use, now that the new data is there.

  3. #3
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    You can also link data in excel to access. There are wizards in the ribbon.

    Andy

  4. #4
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    Quote Originally Posted by ranman256 View Post
    you import the data via:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, tbl, File, True

    then your chart should be self updating via the query you use, now that the new data is there.

    It worked! Thank you so much for the help

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

Similar Threads

  1. Replies: 2
    Last Post: 04-06-2015, 12:08 PM
  2. 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
  3. export data on excel file
    By Mina Garas in forum Queries
    Replies: 1
    Last Post: 12-01-2012, 02:43 PM
  4. Import Data from Excel File
    By zwieback89 in forum Import/Export Data
    Replies: 1
    Last Post: 06-27-2012, 08:44 AM
  5. importing data from an excel file
    By slimjen in forum Access
    Replies: 3
    Last Post: 09-21-2011, 12:38 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