Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy external DB to another folder and rename it based on the text box 1

Status
Not open for further replies.
Feb 4, 2009
137
US
Please help,
I have an access form with 2 text boxes "Start Date" and "End Date" and a button "Closed form". I would like when the user hit the closed button, then it will automatically copy the external database to another folder and rename it based on those 2 text boxes.
The external database is in network "K:\Custom\TVB\Customer.mdb"....This is the original database. On the form, Start Date: 04/01/2009, End Date: 04/21/2009. When user click on the closed button on the form...I would like to copy the Customer database and place it in another folder and rename based on Start and End Date such as "K:\Custom\TVB\NewDB\040109-042109-Customer.mdb"....
If anybody know, please help...I'm very appreciated.
Thanks.
 
Take a look at FileCopy

FileCopy "k:\Custom\TVB\Customer.mdb", _
"k:\Custom\TVB\NewDB\me.StartDate & "-" & me.EndDate & "-Customer.mdb"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top