VB6 (sp4) ADO
I have two concerns. I want to display all files with these extensions: *.htm and *html in my file dialog box, and I want to check to see if the proper file extension was selected before I save its location to the Windows registry. Thanks for your help (as always).
.DialogTitle = "Connect to application's back-end database."
.InitDir = "C:\DS3VB6\DS3_DATA\"
.FileName = "" 'App_BackEndDBName
.Filter = "Access (*.mdb)| *.mdb"
.CancelError = True 'Causes an error if user clicks on cancel
'Remember that the file names are case sensitive
Do While UCase(Right(Trim(frmOptions.cd_Options.FileName), Len("DS3DATA.MDB"))) <> "DS3DATA.MDB"
MsgBox "You are trying to link to the wrong file.", vbCritical, App.Title
App_InventoryPath = Trim(frmOptions.cd_Options.FileName)
frmOptions.txtInventoryPath = App_InventoryPath
'Save the Database location
SaveSetting App.Title, "App_Elements", "InventoryPath_DB", App_InventoryPath