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
20 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 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now