krizma5683
Technical User
I am importing multiple Excel files into a table in an Access database, all my columns define themselves properly except for one. I have a column called "Breaks" that should define itself as a Date/Time field, but since there is not any values in the first row, Access defines it as Text when it imports the data.
This causes problems becuase I need to perform some basic calculations against the "Breaks" field, but can't since it's stored as a Text Value. HELP PLEASE!!
My code:
This causes problems becuase I need to perform some basic calculations against the "Breaks" field, but can't since it's stored as a Text Value. HELP PLEASE!!
My code:
Code:
Sub Bring_In_Rte_Deatils()
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Application.FileDialog(msoFileDialogFilePicker).InitialFileName = ("V:\Customer Care\Rtedtail - IPL\*.xls")
With fd
If .Show = -1 Then
For Each vrtselecteditem In .SelectedItems
FileName = vrtselecteditem
Next vrtselecteditem
Else
End If
End With
DoCmd.TransferSpreadsheet acImport, , "IPL Route Time Details", FileName, True
MsgBox FileName & " imported to 'IPL Route Time Details'", vbOKOnly, "Successful Import"
End Sub