Results 1 to 5 of 5
  1. #1
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581

    Upload a file using File Dialog

    I have a form that I'm trying to upload a file to a server. I am trying to use the File Dialog. I'm using this code:
    Dim fDialog As FileDialog

    Set fDialog = Application.FileDialog(msoFileDialogFilePicker)

    With fDialog
    .AllowMultiSelect = False
    .Filters.Clear


    .Filters.Add "Image File", "*.jpg", 1
    .FilterIndex = 1
    If .Show Then
    Me.txtImageFile.Value = .SelectedItems.Item(1)
    End If

    End With

    It saves the path to my text box [txtImageFile]. Now, I need to upload the file to the server: \\server\Documents\Images.
    I need the path saved back to my form text box [EmplPic]
    I keep looking for ways to do this, but can't find one.

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Here's an example
    Attached Files Attached Files
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    I was having a little problems until I looked at the sample database. Perfect. Thank you.

  5. #5
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Glad to help.
    Good luck with your project
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Use file dialog to allow user to browse for file
    By Betteron2wheels in forum Programming
    Replies: 4
    Last Post: 11-26-2021, 12:47 AM
  2. Upload file and output that file to directory
    By SierraJuliet in forum Access
    Replies: 2
    Last Post: 01-13-2019, 09:28 PM
  3. File Upload
    By SierraJuliet in forum Programming
    Replies: 14
    Last Post: 02-04-2018, 05:15 PM
  4. cannot upload a *.png file
    By Lou_Reed in forum Access
    Replies: 2
    Last Post: 02-23-2017, 11:50 AM
  5. Upload file inside .mdb database file
    By havish in forum Access
    Replies: 0
    Last Post: 07-30-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums