Name: List of forms
Data: Value list (để cài đặt thuộc tính Row Suorce type)
Event: [On Enter]
' Đoạn mã xử lý như sau:
Private Sub Listofforms_enter()' Nhập tiếp thuộc tính After Update của Combo box
Dim MyDb as Database
Dim MyContainer as Container
Dim I as integer
Dim list as string
Set MyDb = DBEngine.Workspace(0).Database(0)
Set My Container = MyDb.Containers("Forms")
List = " "
For I=0 to MyContainer.Documents.count - 1
List = List & MyContainer.Documents(I).name & ";"
Next I
me![List of Forms].Row Suorce = Left(List, Len(list)-1)
End sub
Private Sub ListofForms_AfterUpdate()
Docmd.OpenForm me![ListofForms)
End Sub
Sưu Tầm
Không có nhận xét nào:
Đăng nhận xét