4

Click here to load reader

Web it support and consulting - link many files in ms access

Embed Size (px)

DESCRIPTION

How to link many files (dBase, Excel, CSV, ...) in 1 go in your MS Access database?

Citation preview

Page 1: Web it support and consulting - link many files in ms access

Web-IT Support and Consulting

Web-IT Support and Consulting

A human vision on the digital world

Page 2: Web it support and consulting - link many files in ms access

Web-IT Support and Consulting

Don’t waste any time linking many files

My boss and his (my) team always have creative

solutions and like to share them.

Do you want to link many files in 1 go in Microsoft© Access?Here’s the solution (for dBase, but works also for Excel, …)!

Private Sub BttnLinkTables_Click()

' Define variables

Dim ImportFile As String

Dim ImportDirectory As String

' Initialize variables

ImportDirectory = "C:\WebIT\DBFFiles\"

ImportFile = Dir("")

' Loop through the entire folder and select each file

Do While ImportFile <> ""

' Check if the file is a dBase file (.DBF extension)

If Right(ImportFile, 4) = ".DBF" Then

TableName = Left(ImportFile, Len(ImportFile) - 4)

' Command to link the dBase 5.0 files in your MS Access database

‘ If Excel or other format use different Transfer options

DoCmd.TransferDatabase acLink, "dBase 5.0", ImportDirectory,

acTable, ImportFile, TableName, 0, 0

End If

' Find next file

ImportFile = Dir()

Loop

End Sub

Page 3: Web it support and consulting - link many files in ms access

Web-IT Support and Consulting

Who am I…

I am so proud about these 2 kids.They saw immediately that

Web-IT needed somebody like me (smart, good looking, brains, ...)

One day the 2 little daughters of the owners were playing with the PC of the old man

They saw a presentation of Web-IT Support and Consulting and they asked what W,E,B,-,I,T was

My parents explained that it was the name of the company and they started to make funny noises

Webbit, webbiiiit, webbbi, webbeee and they said it sounded like the sound of a frog

Result?My name: WebbyMy body: a frog

Why is my name is Webby?

Page 4: Web it support and consulting - link many files in ms access

Web-IT Support and Consulting

It might seem a bit weird that I take over the entirescreen.

But it’s my job to end each white paper.I would be glad to give an answer to all your questions

and remarks.Just call or e-mail me.

Oh yeah, ask for Webby. They’ll know where to find me.Thanks for your attention and hope to hear you soon.

Web-IT Support and Consulting bvbaSteenhuffelstraat 8, 1861-Wolvertem

E-mail: [email protected]

Phone: +32 (0)2 309 67 76Mobile: +32 (0)475 59 98 20

GPS: latitude: 50.97395, longitude: 4.30504