Results 1 to 4 of 4
  1. #1
    tommyried is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    38

    browse and upload pdfs,excel word document in access database

    hello everyone,



    I need a code to upload and browse button in forms so that I can browse local files and then upload it to my database.(if possible with a progress bar while uploading files)local files are pdfs,excel & word and I also need a view button to view these files and can delete them in my database .

    attached is my sample db.
    Attached Files Attached Files

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    If you search for "File Picker" you will likely find examples of using the msoFileDialogFilePicker. This will prompt the user to select a file.

    There is an example of this and attaching to an attachments field here
    https://www.accessforums.net/program...tml#post196625

    The example uses a sub routine that calls a function to attach the file. It can be combined into one. It uses the function because the example DB was adapted to the OP's original code.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    The attachment field type has built-in 'browse' and 'upload' capability.

    More code samples for programmatically managing attachments. http://blogs.office.com/b/microsoft-...cess-2007.aspx

    Be aware that Access has a 2GB size limit and embedded files can gobble it up.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    The attachment field type has built-in 'browse' and 'upload' capability......
    I did not know that. Now that I think about it, I believe the link to the DB I provided is for extracting an attachment and it incorporates some of the code in the link provided by June.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-28-2013, 02:41 PM
  2. Replies: 3
    Last Post: 02-22-2013, 06:41 AM
  3. Create Database from Word Document
    By jwtasu in forum Import/Export Data
    Replies: 4
    Last Post: 06-15-2012, 02:12 AM
  4. Closing Word Document From Access
    By bburton in forum Programming
    Replies: 2
    Last Post: 04-25-2011, 10:23 AM
  5. Replies: 0
    Last Post: 06-14-2010, 07:19 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