Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2009, 03:27 AM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Importing Excel to Access

Hi
I am a new bie with Access07. I work in an Oil and Gas services company and have no back groud in programming or database design.
I wanted to design the VBA code for importing an Excel Sheet into Access.
I have defined the table (with required columns and properties).
Basically the VBA code should do the following.
1) Open a pop up(when clicked button on form) which I can use to select the file I want to import(just like when we click the open button on Word and user can navigate where his/her file is stored onto disk)
2) Then the rest importing steps should be automated – that is regarding selecting the “Table” where I want to import the file, selecting the excel work sheet to be used for importing and using first column for table header.
Can someone please help me write this code as I am desperately running against time to submit this project.
Will be extremely greatful for the help/ suggestions. Or write me a example code and I have no knowledge to do so.
Thanks and Regards,
Prashant Kumar.
 
Old April 13th, 2009, 02:15 PM
Authorized User
 
Join Date: Nov 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default I'm new but willing to try and help

I'm not aware of access being able to have a selectable process for importing a file of your choice. I.e File, import, etc. So, maybe someone with more experience can do a better job.

When I import Excel files, I create a macro to import the Excel file. I place this code behind a pushbutton on a form. The drawback is that the file you import has to have the same name. So, some manual intervention is involed for each file you want to import. With the macro, you can code it to import into a specific table and then move to another table for processing then delete the contents of the table that it was originally imported into. Otherwise, I think you would have to develop an appliation in .net or someting along that lines to do what you want.

All,

If I'm wrong, I'm willing to learn.

John





Similar Threads
Thread Thread Starter Forum Replies Last Post
importing excel data into access forms navdeepsinghparmar Access 1 November 7th, 2007 01:27 PM
Importing a Range from Excel JezLisle Access VBA 0 July 27th, 2007 02:54 AM
Importing from Excel to Access table DeborahP Excel VBA 3 April 3rd, 2007 03:21 AM
Importing Excel sheet into Access using ASP prasanta2expert ASP.NET 1.0 and 1.1 Basics 1 October 5th, 2006 02:36 PM
Importing from Excel bmains ADO.NET 1 October 9th, 2004 11:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.