Professional Documents
Culture Documents
i sual B c lusf B
orABp t t sf lnsr( B
)i c p µBm é Ën nñt f r( B
f gl i sual B
c lusf B
Ç®( î v f
í¸s f øf Bd( Ç ôM( Ç nAr( Ç O sf AruronB eoosf 2B
0
VBA là ngôn ngư h˜ ơng s,kie n (event-driven)
Muc ích:
ù Du ng à ̉ lam d̃ dang vie c nhap lie u (phım t˘t, giõ tringẫm à inh)
ù Bỗy lo i: lam cho ng˜ `i du ng hỉ u ro h´n vả lo i à ang xy ra
ù Kỉ m tra tınh hủp le cởa dư lie u ng˜ `i du ng nhap vao
ù Mộ rấng kh n˘ ng cởa Access, cung cứp them như ng chạc n˘ ng ma
Access khóng câ
ù Th,c hie n à ˜ ủc như ng thao tõ c phạc tỉp maAccess khóng cung cứp
ù Xũy d,ng à ˜ ủc như ng ạng dung hoan chınh cho ng˜ `i du ng khóng
phi lacóng nghe thóng tin c ng câ th̉ s dung à ˜ ủc
Microsoft Access-VBA
Objects in Access
Object or
collection Is contained by Contains
Form object Forms collection Controls collection
Properties collection
Module object
Object or
collection Is contained by Contains
Report object Reports collection Controls collection
Properties collection
Module object
Reports collection Application object Report objects
Microsoft Access-VBA
Dim rpt As Report
Set rpt = Reports!Invoice' Returns a reference to the Invoice
report.
Set rpt = Reports("Invoice") ' Returns a reference to the
Invoice report.
Set rpt = Reports(0) ' Returns a reference to the
first report in
' the collection.
Microsoft Access-VBA
Object or
collection Is contained by Contains
Control object Controls collection Controls collection, if
the control is either an
option group or a tab
control
Properties collection
Hyperlink object
Control objects
Report objects