+ Reply to Thread
Results 1 to 4 of 4

How can I programmatically import Excel data into an Access table

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    21

    How can I programmatically import Excel data into an Access table

    The question I had today is whether the following process can be automated and if it is possible what is the best way to go about it for someone such as myself with limited knowledge of coding.

    I've attached 2 files, the 1st one is named "Excel Data Cell" ("EDC"), which is the Excel s/s I enter tha data on, the other is "Access Data Entry" ("ADE"), which is a data entry screen in Access. What I would like to do is automate this process. I will use "ADE" and "EDC" abbreviations to distinguish the file names.

    The following is exactly what I am trying to achieve:

    1) First, I would like for this automation process to be able to pull up each file number seperately in the Access Database. The file numbers are shown in row 1, cell J-N, of the "EDC".

    Once the first file is up (516115), I would like the following automated entries done for each file:

    2)I would like the field directly next to the "Draft #" on the "ADE" field to be populated with the data entered on "EDC" Cell D7 (highlighted yellow)

    3) I would like for the "Date Req:" and "Acctg Draft Date" fields on the "ADE" to both be populated with the data entered on "EDC" cell F3 (Highlighted black)

    3) I would like for the "Amount" field to be poulated with the data entered in cell J7 (highlighted green)

    4) For this spreadsheet I would like for Access to defulat to "Allocated Expense"

    5) I would like for the "Payee" field on the "ADE" to be populated with the data entered in cell A2 (highlighted burgundy)

    6) Lastly, I would like for the "Payment Reason" to list all invoices shown in cell D4 of the "EDC".
    Attached Images Attached Images

  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
    23,951

    Re: How can I programmatically import Excel data into an Access table

    If you either import your spreadsheet into Access or link it; and then bind your Access form/controls to your table/fields you should be able to accomplish what you need.

    Crossposted: http://www.accessforums.net/programm...ata-34772.html
    Last edited by alansidman; 05-09-2013 at 02:23 PM.
    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 tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: How can I programmatically import Excel data into an Access table

    As far as I understood you want to open the form in access and the fields filled from an excel file, that's possible for sure with code in the access form.

    To access the excel file you can either link it to the access db and read the data from that, or, if the excel sheet does not have a data table structure, open the excel file with code and read from that.

    If you need some explicit code examples I would like to ask you to create a sample access db with the form and an excel file with sample source data.

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How can I programmatically import Excel data into an Access table

    CastillB - When you joined the forum recently you agreed to abide by the Forum Rules, but in haste I fear you might not have actually read them. Please stop and take a moment to read them now. We all follow these rules for the benefit of all, as must you. Thanks.

    (link above in the menu bar)

    Quote Originally Posted by Forum Rules
    Your duplicate post did not comply with Rule 5 of our forum rules. The threads were merged.

    ===================================
    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this. In the future please include links to any and all cross-posts in any other forums (not just this site).
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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