3-1 Access 3-1-1 Event Click OnClick Click OnClick AfterUpdate BeforeUpdate On After Before << >> VBA( ) 3-1
3-1 Access Open Load Sub Funtion 3-1-2 Sub Funtion Private
Me Me Forms Reports Form Report VisualBasic VBA Access 2000 Visual Basic Visual Basic 3-2 3-2 Visaul Basic 3-2 Form_People People VBA
3-2 (Form) (Report) 3-1-3 3-1 AfterDelConfirm AfterInsert AfterUpdate BeforeUpdate BeforeDelConfirm ACCESS ( Delete ) BeforeInsert OnActivate OnApplyFilter ( )
OnChange OnClick OnDblClick OnClose OnCurrent OnDeactivate OnError OnDirty OnEnter ( GotFocus ) OnExit ( LostFocus ) OnDelete OnFilter OnFormat
OnGotFocus OnLostFocus OnKeyDown OnKeyPress ANSI OnKeyUp OnLoad OnOpen OnResize OnTimer OnUnload OnUpdated OLE OnMouseDown OnMouseMove
OnMouseUp OnNoData OnNotInList OnPage OnPrint OnRetreat ( Page ) ACCESS 3-1 Access 2000 OnDirty
<< >> VBA
3-2 3-2-1 KeyPress KeyUp KeyDown KeyPress ASCII KeyDown KeyUp KeyCode 3-3 3-3 KeyCode 3-3 Ch3\3-2\Key.mdb KeyDown KeyCode 3-3 KeyPreview
KeyCode 3-2 0 9 48-57 Enter 13 A Z 56-90 PageUp PageDown 33 34 F1 F12 112-123 32 37 39 38 40 Tab 9 Del 46 Home End 36 35 Esc 27 Insert 45 3-2 KeyCode vbkey A vbkeyaf1 vbkeyf1 Enter vbkeyreturn vbkeyenter << >> KeyDown KeyUp KeyCode KeyCode KeyDown KeyUp KeyUp KeyDown KeyUp KeyDown KeyUp KeyDown KeyUp 3-4
3-4 KeyUp 3-4 Ch3\3-2\Key.mdb KeyUp KeyUp KeyCode KeyDown KeyUp Shift Ctrl Shift Alt 3-5
3-5 KeyDown Ctrl 3-6 Ch3\3-2\Key.mdb KeyDown Ctrl+L (intctrldown) 1002 Shift acctrlmask 0 KeyCode 76 1005 1026 1012 << >> 3-5 Ctrl Shift Alt 1001 1003 1002 acctrlmask acshiftmask acaltmask KeyDown KeyUp KeyPress KeyDown KeyUp KeyPress KeyAscii
ASCII ASCII KeyCode KeyAscii 0 3-2-2 MouseMove MouseDown MouseUp Click DbClick Click DbClick DoubleClick Ch3\3-2\Mouse.mdb 3-6
3-6 DblClick 3-7 3-7 DblClick 3-7 DblClick Form_DblClick AfterUpdate
MouseUp MouseMove Ch3\3-2\Mouse.mdb 3-8 3-8 3-8 lastcontrol chcolor MouseMove lastcontrol lastcontrol MouseUp 3-9
3-9 MouseUp 3-9 Button 2( ) IsNull ShortcutMenu( ) << >> MouseUp MouseMove MouseDown Button( ) Shift( Ctrl Shift Alt ) X Y( ) Button 1( ) 2( ) Shift 3-5 X Y Twips 3-2-3 Access BeforeUpdate 3-10
3-10 BeforeUpdate BeforeUpdate Be foreupdate AfterUpdate BeforeUpdate 3-10 Ch3\3-2\Record.mdb saveprompt True BeforeUpdate False << >> BeforeUpdate Cancel True(Cancel=True) BeforeInsert 3-11
3-11 BeforeInsert 3-11 Ch3\3-2\Record.mdb 890316-001 BeforeUpdate 3-10 3-11 saveprompt BeforeInsert ( 1002 1007) 1010 BeforeUpdate 1
1 << >> BeforeInsert Access = * VBA 3-12 3-12 3-12 Ch3\3-2\Record.mdb AfterUpdate IsNull IsNumeric AfterUpdate Format Me![ ] = Format(Me![ ] * Me![ ], "###.00") Ch3\3-2\Record.mdb Format Format
AfterUpdate << >> AfterUpdate Recordset Load Open Load Current Open Load Current Open (Cancel=True) Load Load Open 3-13 3-13 Load 3-13 Ch3\3-2\Record.mdb 3-10 Load Dlookup Label70 Maximize Docmd << >> Dlookup
Recordset Docmd Docmd. DoCmd.Maximize Minimize ESC Access 2000 Dirty Cancel True DoCmd.RunCommand accmdundo 3-10 BeforeUpdate << >> VBA Dirty If Me.Dirty=True Then End If Dirty True False Access ( ) Ch3\3-2\Record.mdb
3-14 Click 3-14 3-14 Click DoCmd.RunCommand accmddeleterecord RunCommand Access 2000 accmd On Error Resume Next Delete BeforeDelConfirm AfterDelConfirm 3-14 BeforeDelConfirm MsgBox vbno Cancel=True Response = acdataerrcontinue vbyes BeforeDelConfirm Cancel True AfterDelConfirm Status 3-14 AfterDelConfirm << >>
3-14 3-15 3-15 3-15 DeleteID BeforeDelConfirm _ DeleteID Execute 3-16 _
3-16 3-16 From * Where NotInList NotInList Ch3\3-2\Record.mdb Tab 3-17
3-17 NotInList 3-17 NotInList Me![ ].Text 3-18 3-18 3-18 Requry << >> NotInList NotInList
Access Timer TimerInterval 0 1000 Timer Ch3\3-2\Record.mdb TimerInterval 1000 Timer 3-19 3-19 Timer 3-19 AfterUpdate Timer 1001 ShowD True Timer 1008 3 1010 SendKeys ESC << >>
Timer TimerInterval 0 Timer Timer 3-2-4 Format Print Retreat Ch3\3-2\Rpt.mdb 3-20 3-20 3-20 3-21 3-21 Format Print Format Print
3-21 1001 MOD ( ) 3-20 0 3-22 twips 567 twips 1 1002 567 << >> 3-21 Format 3-22 3-22 3-22 Ch3\3-2\Rpt.mdb 1 p 1001 Page Format _Page Access _Format Access e/mm/dd 89 3
26 Ch3\3-2\Rpt.mdb convertdate 3-23 3-23 convertdate Access Ch3\3-2\Rpt.mdb Module1 3-24 3-24 3-24 3-23 convertdate converttotext
convertdate yy mm dd << >> Ch3\3-2\Rpt.mdb 3-24 Access Ch3\3-2\Rpt.mdb _ Open 26 26 _ 3-25
3-25 3-25 Open 1002 _ _ 1003 1005 1011 1023 26 31 26 31 << >> Open 3-25 Page
Line B BF (ForeColor ) Access VBA 3-26 3-26 3-26 Ch3\3-2\Rpt.mdb 3-26 Print Print 3-22 << >> Format Print Print 3-22 Format Print Format Open
3-2-5 3-27 3-27 3-27 Ch3\3-2\Record.mdb AfterUpdate AfterDelConfirm Status acdeleteok( ) AfterUpdate << >> 3-27 Private
AfterUpdate Form_.AfterUpdate Cancel True BeforeUpdate AfterUpdate BeforeUpdate Cancel True AfterUpdate Docmd.CancelEvent CancelEvent Cancel << >> Access 2000 Access 2000