اذهب الي المحتوي
أوفيسنا

مشكلة الحفظ في صيغة عند عمل نسخة احتياط


Ahmed.IQ

الردود الموصى بها

لدي كود وضغته عن الضغط على زر خروج يعمل نسخة احتياط في مسار مجلد معين وياخذ التاريخ والوقت بالاضافة الى اسم القاعدة

Private Sub Command4_Click()
Dim Msg, style, title, result
Msg = "هل تريد الخروج من البرنامج"
style = vbYesNo
title = " تحذير سيتم الخروج من البرنامج"
result = MsgBox(Msg, style, title)
Dim OldFile As String, DBwithEXT, DBwithoutEXT, NewFile As String, CopyMyDB
OldFile = CurrentDb.Name
DBwithEXT = Dir(OldFile)
DBwithoutEXT = Left(DBwithEXT, Len(DBwithEXT) - 4)
If result = vbYes Then
NewFile = "c:\access" & "\" & DBwithoutEXT & "-" & Format(Date, "yyyy-mm-dd") & "-" & Format(Now(), "Hh-Nn-Ss-AMPM") & Right(DBwithEXT, 4)
CopyMyDB = "cmd.exe /C copy " & """" & OldFile & """" & " " & """" & NewFile & """"
Shell CopyMyDB, 0
DoCmd.Quit
Else
If result = vbNo Then
DoCmd.CancelEvent
 MsgBox "تم التراجع عن الخروج", vbInformation, "الغاء العملية"
End If
End If
End Sub

الصيغة بعد الحفظ لا تظهر بشكل مطلب 

Sales.a-2016-07-07-12-48-48-مccdb

ومن المفترض تظهر بهذا الشكل

Sales-2016-07-07-12-48-48-م.accdb

مع ملاحظة بسيطه لو كانت قاعدة البيانات بصيغة mdb لاتظهر هذه المشكلة 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information