Solved

VBA code to import excel table in Access

Posted on 2008-06-22
6
6,044 Views
Last Modified: 2013-11-27
Hi! For my Access database, I am looking for a VBA code that would:
- Open a windows dialog box and let the user select an excel file
- create an empty table called "Import"
- copy the content of the columns of the excel file into the column of the access "Import" table.
Blank cells do not need to be imported, only the filled ones.
Thanks!
0
Comment
Question by:gallandjc
  • 3
  • 2
6 Comments
 

Author Comment

by:gallandjc
ID: 21841858
Sorry, to make it clear, the Access table must be a duplicate of the excel table ie have the same number of columns with the same data in the cells.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21841886
try this sample db
selectExcel.mdb
0
 

Author Comment

by:gallandjc
ID: 21841988
Looks Great! The only thing is when I import your form in my own database, it opens in full page and not like a popup window (as it does in your sample db). How can it make it look the same?
Thanks
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21842036
set the popup property to  yes
0
 

Author Closing Comment

by:gallandjc
ID: 31469581
Great, as always...
0
 

Expert Comment

by:gfranco
ID: 37887958
Your code works, fine, but what is the reason when we are importing to a DB, the table has first line blank.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

840 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