Short Code to use a Browser Window through Microsoft Access

B

baranz

Hello everyone!
Thank you very muzh for your site! It was really helpfull for me very
often.
I have a short and simple code to get to a browser window from Access.
It passes a string of file path to any field.



********************************************************************************************************
Private Sub Command1_Click()
'Microsoft Office 10.0 Object Library reference is needed.
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
With fd
..AllowMultiSelect = True
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
'Indicate the field where you want the path string to go
Forms!frmModels!txtImageName.Value = vrtSelectedItem
Next
Else
End If
End With
Set fd = Nothing
End Sub
*********************************************************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top