Results 1 to 7 of 7
  1. #1
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9

    Save Attachments.


    Does anyone have any source code for saving attachments to a file within a specific record?

    Cheers,

    Col.

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    If you are wanting to use the new attachment data type in a .accdb then check out:

    Microsoft® Access 2007 Working with the Attachment DataType


    I prefer this method: Document Links

  3. #3
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9
    Great thanks for that. will have a good read thru.

    cheers,

    colin

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Colin,

    You're welcome.

    Cheers,

  5. #5
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9
    Hi,

    thanks for your help. just read
    Microsoft® Access 2007 Working with the Attachment DataType

    and it works a treat. i used the code for saving to sever and worked great. i i have code for attaching files base on paths so that is all i need just have to get them working together but sure i can do that.

    with vba do you ever get to a stage where you can just write code from the start or does every one use sample codes form msdn or vba help?

    I really struggle to right things from scratch but can understand a lot of example code?

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    I have written most of the VBA code I use. I have created a library databases that have all the code organized into modules. I have separate database by version as I make changes.

    When I am working on a project is is easy to just import my code.

    I have been doing this so long that I have code in a library for just about everything I ever do. I have not really done a whole lot of new this in Access in a long time. Even in 2007/2010 I still use a lot of code I wrote for Access 97 and 2000. Even some VBA code that I wrote in Access 2.0. I just have to write some new code when a new feature is introduced into Access. Most of the changes in Access over the years have been in the UI and not that much on the VBA side. There have been a few new VBA command and some new objects. For me the biggest changes were the new way menu bars were handled going from Access 2.0 to Access 95. The next big change did not happen for over 12 years with the new Ribbon in 2007.

    When I am need to get stuff done really fast it seams like I cut and paste more that I type.

    I have been looking at code listings and/or code samples for 30+ years. It is a great way to learn. I find that I learn a lot more when I had a code listing and retype it. Before the Internet we purchased magazines, journals, and books with code listings. We had to retype pages of code. Even today when I see a web site with code listings, I will retype the code. I do not just cut and paste it. I think this teaches some valuable skills.


    I really struggle to right things from scratch but can understand a lot of example code?
    The best way to get past this is to stop copying code and start writing it yourself.

    I have actaully learned some new and better ways of doing things by rewritrng code from scratch and not just copying and pasting.

    I was told many many years that you truely have not mastered something until you can create/do it yourself and also teach it to others. I think this holds true for writing software.

    I have watched some people doing stuff in Acess and they will spend a lot more time looking for code that it work take tio write it.

  7. #7
    schmoe is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    1
    Quote Originally Posted by HiTechCoach View Post
    I have written most of the VBA code I use. I have created a library databases that have all the code organized into modules. I have separate database by version as I make changes.

    When I am working on a project is is easy to just import my code.

    I have been doing this so long that I have code in a library for just about everything I ever do. I have not really done a whole lot of new this in Access in a long time. Even in 2007/2010 I still use a lot of code I wrote for Access 97 and 2000. Even some VBA code that I wrote in Access 2.0. I just have to write some new code when a new feature is introduced into Access. Most of the changes in Access over the years have been in the UI and not that much on the VBA side. There have been a few new VBA command and some new objects. For me the biggest changes were the new way menu bars were handled going from Access 2.0 to Access 95. The next big change did not happen for over 12 years with the new Ribbon in 2007.

    When I am need to get stuff done really fast it seams like I cut and paste more that I type.

    I have been looking at code listings and/or code samples for 30+ years. It is a great way to learn. I find that I learn a lot more when I had a code listing and retype it. Before the Internet we purchased magazines, journals, and books with code listings. We had to retype pages of code. Even today when I see a web site with code listings, I will retype the code. I do not just cut and paste it. I think this teaches some valuable skills.



    The best way to get past this is to stop copying code and start writing it yourself.

    I have actaully learned some new and better ways of doing things by rewritrng code from scratch and not just copying and pasting.

    I was told many many years that you truely have not mastered something until you can create/do it yourself and also teach it to others. I think this holds true for writing software.

    I have watched some people doing stuff in Acess and they will spend a lot more time looking for code that it work take tio write it.
    Hear, hear!

    As for this saving attachments stuff, eek.

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

Similar Threads

  1. Attachments
    By cjp78 in forum Access
    Replies: 4
    Last Post: 05-11-2010, 07:30 AM
  2. attachments to predefined directory
    By surfcaster in forum Forms
    Replies: 0
    Last Post: 03-04-2010, 02:22 PM
  3. list attachments in form
    By hawaiikim in forum Forms
    Replies: 0
    Last Post: 08-24-2009, 11:08 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