I need help getting the code below to work. I already have code to browse for a file I just need this piece to work. The problem is in the docmd. line. I need for the Function below to just import the filename (not change it). I don't need new code that has wizards and bells - I just need help with this code below. I attached the database with the module . Thanks
Function Importfile() As Integer
Dim strwsname As String
Dim filespec As String
Dim strfilename, tblname, tablename As String
Dim i As Integer
Dim newfilename As String