I have this code that works when the input file is NOT a dBase III input file, i.e. an MDB. When it is a DBF, however, I'm getting an error message that the path and file do not exist even though it does. Any clues why it won't work? Here's the code snippet. It fails at the first cn.Open statement.
Code:
Public Function strShowUsers(strMDB as String) As String
Dim cn As New ADODB.Connection, rs As New ADODB.Recordset
If UCase(Right(strMDB, 3)) = "DBF" Then
cn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & strMDB & "; Extended Properties = DBASE III;"
Else
cn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & strMDB
End If
Set rs = cn.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
Thanks in advance.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division