Hỏi cách mở shift có password

  • Thread starter nhuy58
  • Ngày gửi
N

nhuy58

Guest
13/9/12
4
0
0
Sì gòn
Chào các bạn!
Mình có tạo 1 file để khoá hoặc mở Shift trên file khác tại thư mục D:\DULIEU.mdb
Đây là code mở Shift:

On Error GoTo ErrHandler

Dim db As Database
Dim ThuocTinh As Property

Set db = OpenDatabase("D:\DULIEU.mdb")
db.Properties("AllowBypassKey") = True
Set db = Nothing

Egress:
On Error Resume Next
Set db = Nothing
Set ThuocTinh = Nothing
Exit Sub

ErrHandler:
MsgBox Err.Number
If Err.Number = 3270 Then ' Property not found.
Set ThuocTinh = db.CreateProperty("AllowBypassKey", dbBoolean, True)
db.Properties.Append ThuocTinh
Resume Next
Else
MsgBox Err.Description
Resume Egress
End If
===========================
Bây giờ mình muốn tạo Password trong Access cho file DULIEU là 123456
Như vậy thì code trên sẽ phải chỉnh lại như thế nào để mở Shift được?
Nhờ các bạn giúp dùm, cám ơn rất nhiều.
 
Khóa học Quản trị dòng tiền

Xem nhiều