Solved

in access 2016 - open a browser aand select a file, the path shuld be saved in a field

Posted on 2016-10-26
3
53 Views
Last Modified: 2016-10-26
in access 2016 - I would like to create a button that upon clicking it, it will open the list of files allowing me to select the desired file, and at the same time, the system will insert the file location path into the field.
It should not run the file like a hyperlink button.
0
Comment
Question by:Moshe Singer
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 41861032
try this codes, add the Microsoft Office 16.0 Object Library to your References
change Me.txtFullPath with the name of your Textbox

Private Sub cmdSelect_Click()
Dim fd As Object
Set fd = Application.FileDialog(3) 'msoFileDialogFilePicker
With fd
    .Filters.Clear
    .InitialFileName = CurrentProject.Path & "\"
    .Title = "Select File"
    .AllowMultiSelect = False
    .ButtonName = "Select"
    .Filters.Add "All Files (*.*)", "*.*"
    .InitialView = msoFileDialogViewList
    If .Show Then
        Me.txtFullpath = .SelectedItems(1)
        Else
        Exit Sub
    End If

End With
0
 

Author Comment

by:Moshe Singer
ID: 41861105
thanks a million, it works wondrfull
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41861139
don't forget to close the thread, by accepting the post that resolve your problem
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question