Unanswered: Is there any way to use parameter for table and browse to Import text file with DoCmd
I'm trying to import text file in Access DB. Here all are linked table by ODBC from SQL Server. I'm trying with this code as below:
Private Sub cmdUpdate_Click()
Dim strSelectedFile As Office.FileDialog
Set strSelectedFile = Application.FileDialog(3)
strSelectedFile.AllowMultiSelect = False
If strSelectedFile.Show Then
MsgBox strSelectedFile.SelectedItems.Count & " file(s) were chosen."
' Display the full path to each file that was selected
Dim i As Integer
For i = 1 To strSelectedFile.SelectedItems.Count
DoCmd.TransferText acImportDelim, , "" & Me.cboTableList & "", strSelectedFile, 0
Note: When you ask for a solution to a problem, please report the error you received (code + description) as well as line on which the error occurs, or explain at least what does not work. This spares us part of the time and work needed to decipher and understand your code.