
May 24th, 2004, 12:21 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
FileDialog in MSAccess
I'm trying to run a selected file using the new (to Access) Application.FileDialog tool.
My code is like this:
With Application.FileDialog( _
MsoFileDialogType.msoFileDialogOpen)
If .Show Then
' I want to run the program here. That is, if a ".xls" file is sellect open up that file, if a ".doc" file is selected ... run it.
.Execute(.SelectedItems(1), whatever) doesnt seem to work. (at least the way i have attempted to construct it)
End If
End With
One thing i tried was to take the selected item and copy it to a hyperlink field in the table that is on the form.
This worked great ... but I had to click there again .. I mean after I had already selected it in the file dialog window.
So, I guess another question would be:
Is there a way in Access to automatically execute a hyperlink on a form without manually clicking on it. VB has the .follow property but i can't use that on an Access form.
Thanks all in advance,
wa
|