Results 1 to 5 of 5
  1. #1
    STAN is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Posts
    1

    Populate access forms from excel

    Hello!



    I have an access database that is used to generate microbiology test reports; i want to be able to tweak it a little bit so that i can avoid redundant data entry. The way it is being done now is, data from food samples are entered(by sample collectors) into an excel file and sent to the 'data entry person'/'lab technician' who then enters the excel data in an access form along with her own test result data and then saves this as a new record into the access table. What i would like to avoid here is having to manually enter the excel data onto the access forms. I want to be able to import the data from the excel files to populate onto the new access form and then have the 'data entry person'/'lab technician' enter her test results onto the remaining fields in the form and then save all this as a new record into the access table.
    How i visualize this is, using a command button that,when clicked, opens up a "browse" window from where we choose the excel file to import; after the file is chosen it populates the excel-data onto the appropriate fields in the access form and then the 'data entry person'/'lab technician' can then enter the test results portion of the form and then save all this into the database.
    Will anybody lead me in the right direction here?

    Many Thanks!

  2. #2
    Join Date
    May 2010
    Posts
    339
    Hi Stan,

    I will say up front I am not familar with your version of Access, but here is a link that will help you get your head around how a file browser is coded.
    http://www.mvps.org/access/api/api0002.htm

    Post back if you need more help

  3. #3
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    here is a link that i think might help you. It deals with how to import data into an acccess database from an excel sheet.


    https://www.accessforums.net/program...heet-6317.html

  4. #4
    Join Date
    May 2010
    Posts
    339
    STAN:
    How i visualize this is, using a command button that,when clicked, opens up a "browse" window from where we choose the excel file to import;
    maximus: https://www.accessforums.net/program...heet-6317.html
    doCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Sheet1", "C:\test.xls", True, "Sheet1$"

    How will this help him to browse?

  5. #5
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    correct me if i am wrong but I think there is a form control in Access 2010 for Browsing files. Its there is Ms Access 2007. The File selected in the Browser control can be referenced in the Docmd.TransferSpreadSheet to import Data from the excel file.

    In Access 2000 I think you can do the same thing using ActiveX Controls Common Dialog Control.

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

Similar Threads

  1. Using random fields in Excel to populate Access table
    By cryswater in forum Import/Export Data
    Replies: 3
    Last Post: 05-14-2013, 02:50 PM
  2. Link from access forms to Excel file
    By aligahk06 in forum Forms
    Replies: 1
    Last Post: 04-30-2010, 04:24 AM
  3. Replies: 1
    Last Post: 08-31-2009, 10:24 AM
  4. Replies: 1
    Last Post: 05-28-2009, 05:08 AM
  5. Replies: 0
    Last Post: 01-19-2007, 07:58 AM

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