By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

How to copy a file into a folder by Ms Access

P: 1
Hi ,
I want to copy a file ( i can define from a textbox ) into a folder by using Ms Access codes ?
Your soonest reply is appreciated.
May 14 '07 #1
Share this Question
Share on Google+
2 Replies


maxamis4
Expert 100+
P: 295
Start with this link. You will need this API for the feature you are looking for
http://www.mvps.org/access/api/api0001.htm

then do a search with google on this particular api+copy file. I am sorry I can't give you much more. i did this sometime ago at another job, and never took the mdb with me as a reference. Can't remeber exactly how i did it.

Hi ,
I want to copy a file ( i can define from a textbox ) into a folder by using Ms Access codes ?
Your soonest reply is appreciated.
May 14 '07 #2

ADezii
Expert 5K+
P: 8,619
Hi ,
I want to copy a file ( i can define from a textbox ) into a folder by using Ms Access codes ?
Your soonest reply is appreciated.
If you want to copy a File from a Text Box, and remain strictly in the confines of Access (VBA), it doesn't get much simpler than this:
Expand|Select|Wrap|Line Numbers
  1. Dim SourceFile, DestinationFile
  2.  
  3. SourceFile = Me![txtSourceFile]     'e.g. "C:\Test\Test_File.doc"
  4. DestinationFile = "C:\Windows\System32\Test_File.doc"   ' Define target file name.
  5.  
  6. FileCopy SourceFile, DestinationFile                    ' Copy source to target.
May 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.