tommeekers
Programmer
I found some code that makes my application check the link to the backend database at startup. When the link is broken, it displays a pop-up form where I can specify the location of the database file. This pop-up form contains a CommonDialog control to browse to the file.
I'm running the Access developer edition and the code works fine for me. However, user running the Access Runtime version get an error when they try to browse:
[tt]There is no object in this control[/tt]
Anyone know how to fix this ?
I'm running the Access developer edition and the code works fine for me. However, user running the Access Runtime version get an error when they try to browse:
[tt]There is no object in this control[/tt]
Code:
Public Function Browse()
On Error GoTo Err_Browse
Dim strFilename As String
Dim oDialog As Object
Set oDialog = [Forms]![frm_connectie]!xDialog.Object
With oDialog
.DialogTitle = "Select database file"
.Filter = "Access Database (*.mdb;*.mda;*.mde;*.mdw)|" & _
"*.mdb; *.mda; *.mde; *.mdw|Alle bestanden (*.*)|*.*"
.FilterIndex = 1
.ShowOpen
If Len(.FileName) > 0 Then
[Forms]![frm_connectie]![txtFileName] = .FileName
End If
End With
Exit_Browse:
Exit Function
Err_Browse:
Msgbox Err.Description
Resume Exit_Browse
End Function
Anyone know how to fix this ?