Solved

IMPORTING EXCEL FILE AFTER USER CHOOSES FILE INTO NEW TABLE

Posted on 2011-09-23
8
205 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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