give this a whirl
add a common dialog control to your first form
Code:
Private Sub FindDB()
Dim dbLocation As String
On Error GoTo Open_Error
With CommonDialog1
.DialogTitle = "Find database"
.CancelError = True
.Flags = cdlOFNFileMustExist
.InitDir = App.Path
.Filter = "Microsoft Access Database |*.mdb"
.ShowOpen
dbLocation = .FileName
End With
Exit Sub
Open_Error:
Select Case Err.Number
Case 1
Exit Sub
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical
End Select
End Sub
You might have to change a few things around to fit your program, but that is the basics of it.