+ Reply to Thread
Results 1 to 7 of 7

Importing From Access

  1. #1
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Importing From Access

    I have an excel spreadsheet that I want to be able to manually enter a 'Job Number' in 'C4' and then press a button. When the button is pressed it imports data from an access database called 'JobInfo', from a query called 'qryImportToExcel', but I want to filter my query field 'JobNumber' by excel 'C4' value. There will be only one row of data for each 'JobNumber'.

    when importing the data, I need fields from the query to go to specific cells. example: qryImportToExcel!CustName should go to 'C5', qryImportToExcel!CustCity should go to 'C8'.

    I tried using the power query but I can't get it to filter from a specific cell or add the values where i want them to go.

    any help or good references would be apprciated.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,023

    Re: Importing From Access

    Look at this link an see if it helps to guide you in the right direction.


    http://accessblog.net/2006/07/export...cel-range.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Importing From Access

    adjust to put the retrieved data where you want.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Importing From Access

    ranman256:

    I put the code into a module and I get an unrecognized database format. I noticed you have a .mdb, I have a .accdb Is that the issue and can it be modified?


    I do have Microsoft Office 16.0 Object Library set up as a reference and I tried

    HTML Code: 
    Last edited by Cobra17; 02-11-2021 at 12:18 PM.

  5. #5
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Importing From Access

    bump for some more guidance.



    HTML Code: 

    This sort of works, but I can't figure out how to filter. I've been trying to edit this line with no luck:

    HTML Code: 
    Last edited by Cobra17; 02-22-2021 at 02:37 PM.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,023

    Re: Importing From Access

    Did you look at the link I provided?

  7. #7
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Importing From Access

    I did check out the link.


    I managed to get the code to work:

    HTML Code: 

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Access VBA to add a primary key (first field) after importing to access
    By ewong in forum Access Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2012, 08:57 PM
  2. Generating an Excel sheet and importing it into Access with VBA triggered in Access
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2012, 07:43 AM
  3. [SOLVED] HELP PLEASE - Importing from Access
    By jwr in forum Excel General
    Replies: 4
    Last Post: 02-22-2012, 06:33 AM
  4. importing from access
    By heramiah in forum Excel General
    Replies: 4
    Last Post: 06-19-2008, 05:46 AM
  5. Importing data from Access to Excel, but I need to vary the table from Access
    By Liz L. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2006, 09:15 PM
  6. importing data from access-database access file
    By amrezzat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2005, 04:25 PM
  7. Importing from Access
    By Importing from Access in forum Excel General
    Replies: 0
    Last Post: 06-21-2005, 07:05 AM

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