473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Import Multiple tables into Access | File Dialog VBA

Hei :)

I'm fresh in Access. I'm creating a form whose first step is to import 3 files from Excel into existing tables.I want to ask the user the file path of each file and then import them to 3 separate tables.

Do you have any suggestion?

I really appreciate your help :)
Oct 7 '15 #1
2 1075
click on your import, if you already have the tables created that you want to move the files into, then just select that table that you want to append to each time. If you do not have the tables already created, then just add them to your database. do you want to do that in your form or just do it straight from access?
Oct 8 '15 #2
you could try something like this. i used this example, just change up the path and rename things and it should work, after you create your button for import
Expand|Select|Wrap|Line Numbers
  1. Private Sub buttonimport_Click()
  2. txtFilePath = ITC_FileDialog("G:\PD\SPRDOCS\Classification Project\SPR Class Database\inbound")
  3.  
  4. Dim s() As String
  5. s = Split(txtFilePath, "\")
  6. SprFileName = (s(UBound(s)))
  7. 'SprFileName = s.Length - 1
  8.  
  9.  
  10.  
  11. End Sub
Oct 8 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: N. Graves | last post by:
Help me please? I'm have users import tables from other Access Database in one of the process needed to use my ADB. To do this the user opens a form with a field for the file directory and...
1
by: tezza98 | last post by:
I need some help. Im using a dtsrun command to import 9 tables into an Access database, most of the tables have about 1000 rows, but one has 20000+ rows and grows everyday. Im Using Access 2003...
3
by: derfer | last post by:
I am trying to import a .inf file into access (the file comes from the output of some 3rd party software). I have managed to convert the file by opeing it in notepad and re-saving then a seperate...
6
by: clloyd | last post by:
I have a database with over 20 tables. I need to delete one to many record(s) in all tables by using a loop code. Some tables with have one record, multiple records or no records for the criteria...
4
by: knix | last post by:
I have this access project consisting of multiple tables that are linked together in a relationship. I would like to migrate the consolidated information through appending in a datasheet form or...
0
by: NareshN | last post by:
Hi All, I have this tables.I want to upload excel file data to multiple tables. Excel file consist of EmpName,1 week dates with data(TimeIn and TimeOut). I want to insert EmpName into...
2
by: Gayathiry A | last post by:
Now i have tried with IMPORT FROM "E:\DOCS\JARS\testDB-data\test.ixf" OF IXF CREATE INTO testDB.test; Is there any way to import more than one .ixf files at once ? Could anybody help me on this ?
13
by: WU JU | last post by:
Hi. I have thousands of excel files in one directory. I want to build up the Access table from excel files. Each excel file has one worksheet, but I don't need every column and low of the...
6
by: timleonard | last post by:
I am trying to use vba to import a tab delimited txt file where both the file name and the content varies. I have a form with a button linked to the code, it will import the tab delimited file,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.