I am importing an XLS file to replace an existing table and would appreciate any help (see Help?) in accomplishing the following,

1 - Delete existing table (OK)
2 - Import new file (OK)
3 - Add new field (OK)
4 - Set up new field as Primary Key (Help?)
5 - Rename a field name (Help?)
6 - Rename a table name (Help?)



Sub ImportExcelTable()

Dim TemplatePath As String
TemplatePath = "FileserverVolumeDocList"

' Step 1 - Delete existing table (function)
DeleteExistingTables

' Step 2 - Import new file
DoCmd.TransferSpreadsheet transfertype:=acImport, _
TableName:="tmpTableName", _
FileName:=TemplatePath & "numbers.xls", Hasfieldnames:=True, SpreadsheetType:=5
'The Spreadsheet type = 5 specifies an Excel 5.0/7.0 file
'format

' Step 3 - Add new field
AddCounter "tmpTableName", "ID"

' Step 4 - Set up new field as Primary Key (Help?)
' Step 5 - Rename a field name (Help?)
' Step 6 - Rename a table name (Help?)

end


regards,
otk