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
64 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

623 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