I normaly do the following code:
VB Code:
Set FSys = New FileSystemObject If gstrDBLoc = "" Then gstrDBLoc = App.Path If gstrDBName <> "" And FSys.FileExists(gstrDBLoc & "\" & gstrDBName) Then OpenDB Else fDBLoc.Show Exit Sub End If If Not FSys Is Nothing Then Set FSys = Nothing
If the database is not there I open a form and allow the user to point me to the new database location. Altough I do not use the data controls you can just exit out with a message if the database is required to be in a specific place.




Reply With Quote