user793468
user793468

Reputation: 4966

inserting data from a file in access table

I have a form in access with a button that lets user select a text file(file dialog). How can I insert the data from that selected file in a table?

Here is my code for selecting a file:

Sub InsertData()

Dim fDialog As Object  
 Set fDialog = Application.FileDialog(1) 
with fDialog 
 .AllowMultiSelect = False
 .Show  
 End If 

End Sub

Thanks in advance

Upvotes: 0

Views: 98

Answers (1)

Fionnuala
Fionnuala

Reputation: 91356

You may be able to use DoCmd.TransferText

Upvotes: 3

Related Questions