yedekleme yolunu değişitmek

27/06/2013, 13:45

zetyu

Kullandığım yine sitenizden aldığım bir yedekleme kodu var .aynı dosya içine yedekleme yapabiliyorum
Özellikle bunu kullanmamın sebebi çok hızlı bir şekilde başka form açılırken yedeklemeyi hemen yapıyor ancak tüm çabalarıma rağmen yedek yolunu değiştiremedim mesela(d:\yedek\ ) içine atmak istiyorum

daha önceden sorulmuş ama çözüme ulaşamadım.ilgilenen arkadaşlara teşekkür ederim


Dim strDB As String
Dim strBackupName As String
DoCmd.Hourglass -1
Let strDB = "ydk.mdb"
Let strBackupName = Date & "_" & strDB
Path = CurrentProject.Path
Let strDB = Path & "\" & strDB
Let strBackupName = Path & "\YEDEK\" & strBackupName
Set fileObj = CreateObject("scripting.filesystemobject")
fileObj.CopyFile strDB, strBackupName, True
DoCmd.Hourglass 0
27/06/2013, 14:14

C*e*l*o*y*c*e

bunu kullan..
27/06/2013, 15:09

zetyu

cevabınıza ve ilginize çok teşekkür ediyorum
verdiğiniz örnek yolu kendim göstermem gerekiyor ama.ben kodun içine yolu yazmak istiyorum ve özellikle bu kodu kullanmak istiyorum.


Path = CurrentProject.Path yerine path="C:\888\" yazdım olmadı.

Let strDB = Path & "\" & strDB yerine Let strDB = ="C:\888\" & "\" & strDB yazdım olmadı.
.
Ben bu örnekte kodun içine yolu yazmak istiyorum.

Path = CurrentProject.Path
Let strDB = Path & "\" & strDB
Let strBackupName = Path & "\YEDEK\" & strBackupName
27/06/2013, 16:35

ozanakkaya

Let strBackupName = Path & "\YEDEK\" & strBackupName
kodunu aşağıdaki ile değiştiriniz.

Let strBackupName = "d:\yedek\" & strBackupName
27/06/2013, 17:47

zetyu

Ellerinize sağlık ..teşekkür ederim

işlem tamam