Solved

IMPORTING EXCEL FILE AFTER USER CHOOSES FILE INTO NEW TABLE

Posted on 2011-09-23
8
201 Views
Last Modified: 2012-08-13
I am looking to have the user open access click a button and have them choose a xls file.  Then import it into a table, this table can be overwritten each time.  The files will be the same formatt every time, just different data in them.

thanks
0
Comment
Question by:BOULMAN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
8 Comments
 
LVL 3

Expert Comment

by:Marakkar
ID: 36591305
Rather, I propose you link to an external table. You can overwrite it the xls file while not in use.  Link remains valid as long you do not disturb the name and path.  Use a button to open this linked table.
0
 

Author Comment

by:BOULMAN
ID: 36591323
The issue I have is the file will be created each day and I need the users to be able to import the data with little effort.  I could have the user rename the file each day, but I would like to find an option that minimizes steps.
thanks
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 36591357
BOULMAN,

Even if the file is recreated each day, if it keeps the same name/path then Marakkar's suggestion looks fine to me...

Patrick
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:BOULMAN
ID: 36591384
It will have a different name.  But in my searchs I found a partial solution. On 8/6/08 capricorn1 came up with a sample db the does almost exactly what I need.  The only problem is it does not over ride the old imported table here is the code
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Import", Me.txtFileName, True
Is there a way to modify this to override the existing "import" table?

thanks
0
 

Author Comment

by:BOULMAN
ID: 36591488
Ok I got it.  Using the post from capricorn1 on 8/6/08 I was able to take that sample db then create a update query removing the data in the table before importing it.  Should I give create to capricorn1 since it got me started on the right path?
0
 

Accepted Solution

by:
BOULMAN earned 0 total points
ID: 36592342
I took the database from capricorn1-http://filedb.experts-exchange.com/incoming/2008/08_w32/48122/ImpbrowseExcel.mdb
I then utilitzed an update query on the onclick event for the Select File button to remove any existing data within the import table.
0
 

Author Closing Comment

by:BOULMAN
ID: 36813383
Database buillt was useful in importing data.  Minor changes were made to meet my needs.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question