M
morgan
Hello everybody, I'm making my MP3 collection db importing xls files created
by an MP3 tag editor. I have the following code to append the xls file to my
access table and everything work fine. Since the last row of the xls file is
always "this list has been created with..." I'd like to modify the code to
delete the last record appended on my access table and then refresh the form,
in order to get immeditely the new records. I'm using access 2003.
Tks in advance
Private Sub Comando10_Click()
Dim dlg As FileDialog
Dim Importfile As String
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.Title = "Select the Excelfile to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xls", 1
.Filters.Add "All Files", "*.*", 2
If .Show = -1 Then
Importfile = .SelectedItems(1)
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"Db_MP3", Importfile, True, "A1:E1000"
Else
Exit Sub
End If
End With
End Sub
by an MP3 tag editor. I have the following code to append the xls file to my
access table and everything work fine. Since the last row of the xls file is
always "this list has been created with..." I'd like to modify the code to
delete the last record appended on my access table and then refresh the form,
in order to get immeditely the new records. I'm using access 2003.
Tks in advance
Private Sub Comando10_Click()
Dim dlg As FileDialog
Dim Importfile As String
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.Title = "Select the Excelfile to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xls", 1
.Filters.Add "All Files", "*.*", 2
If .Show = -1 Then
Importfile = .SelectedItems(1)
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"Db_MP3", Importfile, True, "A1:E1000"
Else
Exit Sub
End If
End With
End Sub