Does anyone have any source code for saving attachments to a file within a specific record?
Cheers,
Col.
Does anyone have any source code for saving attachments to a file within a specific record?
Cheers,
Col.
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
Boyd Trimmell aka Hitechcoach
Database Architect and Problem Solver
Microsoft MVP - Access Expert
25+ years specializing in Accounting, Inventory, and CRM systems
"If technology doesn't work for people, then it doesn't work."
Great thanks for that. will have a good read thru.
cheers,
colin
Colin,
You're welcome.
Cheers,
Boyd Trimmell aka Hitechcoach
Database Architect and Problem Solver
Microsoft MVP - Access Expert
25+ years specializing in Accounting, Inventory, and CRM systems
"If technology doesn't work for people, then it doesn't work."
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?
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 really struggle to right things from scratch but can understand a lot of example code?
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.
Boyd Trimmell aka Hitechcoach
Database Architect and Problem Solver
Microsoft MVP - Access Expert
25+ years specializing in Accounting, Inventory, and CRM systems
"If technology doesn't work for people, then it doesn't work."
Hear, hear!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.
As for this saving attachments stuff, eek.