I need help understanding why the following code is not working correctly.
When run, I can open .mdb files by changing the filter option to "All Files
(*.*)" but while "Access Database (mdb.*)" is selected no db files are
listed in the OpenFileDialog box....
-------------------------------------
Private Sub btnDatabase_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDatabase.Click
Dim objOpenFileDialog As New OpenFileDialog
With objOpenFileDialog
.Filter = "Access Database (*.mdb)|*.mdb | All files (*.*)|*.*"
.FilterIndex = 1
.InitialDirectory = "C:\"
.Title = "Open Access Database"
End With
If objOpenFileDialog.ShowDialog = DialogResult.OK Then
txtDatabase.Text = objOpenFileDialog.FileName
End If
End Sub
-----------------------------
Thanks,
Mike