I would like to be able to create a dao.recordset from a .xls file, and also a .dbf file.
I use the following code to create a dao.recordset from a .csv or .txt file:
Can someone tell me how I would change this code to do the same for an .xls, .xlsx or .dbf file?
Thanks,
Sup
I use the following code to create a dao.recordset from a .csv or .txt file:
Code:
Dim sql as string
Dim rst as DAO.Recorset
sql = "Select * FROM [Text;;FMT=Delimited;HDR=YES;IMEX=2;DATABASE=C:\Documents and Settings\Owner\Desktop\].[DataIn.CSV]"
Set rst = CurrentDb.OpenRecordset(sql)
Can someone tell me how I would change this code to do the same for an .xls, .xlsx or .dbf file?
Thanks,
Sup