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
Solved

IMPORTING EXCEL FILE AFTER USER CHOOSES FILE INTO NEW TABLE

Posted on 2011-09-23
8
199 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
  • 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

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.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

828 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