.


:




:

































 

 

 

 





. (, If...Then For...Next). , , , .

Access . , .

. , . , . , , , - .

Exit For Do ( Sub Function). Exit : Exit For , , For, a Exit Do Do:

Exit Do Do.

Sub Function. . Exit Sub Exit Function , , , . Exit Sub Exit Function Exit For Exit Do. Exit Sub Exit Function Sub Function ( ) , .

Access

, Access, , , , , . Access . Access .

 

, , .
Access .
, , , .
Microsoft Graph , Access.

. , , . , , . (, ), . , , . .

( ) , .

Access , . , .

, , . , , , .

. . , . ; , , .

, . , Text .

, :

. =

, , :

= .

. , , . , . , :

.

. , . , . , .

! . (). ! . () , .

! , , . . () , Microsoft Access. . () SQL, Visual Basic . , Forms![aa].Controls Controls . , Controls , , .

Access . , .

. . , , Access, , Visual Basic . :

;

Collection.

. , :

:

Dim As _

:

Set =

, Dim, ReDim, Static, Private Public. New

:

{Dim | ReDim | Static | Private | Public} As [New]

, , :

Dim FormVar As New ' .

New . New, , Set.

, :

Dim anyForm As Form ' ( Form)

, ( ) , TextBox:

Dim anyText As TextBox

:

Dim anyControl As Control '

. Set:

Set =

, , .

. . ( ). , TextBox ListBox.

. , , ; .

Access : Form ( ), Control ( ), Object ( ).

, , . , , , Form.

. . , .

Unload. , , , . Load, , .

, , Nothing. Nothing . Nothing Set. :

Set = Nothing

. Nothing .

, , , , , Nothing Set, .

Access

. . , Public Private.

Property .

Class, Initialize Terminate. . Initialize , . Terminate , , .

. .

. , , . , , - .

. - public.

- Property

, :

, , ;

, ;

(, ) , , ;

, Visible;

Visual Basic , .

Property Get
Property Let
Property Set (.. , )

. Visual Basic - , .

- public Sub Function . Sub Function - public , Public.

? , . .

- , , - , . - , (Color) (Name), - , Move Show.

, , , , , " ".

" ", . : , , ; , , .

- , .

. , , - . , .

 

VBA

. : ; ; .

. . , , , Next For, Access .

, Access .

:

1. .

2.

. , Access , . . , .

. , , . , , , , . .

? , :

, ;

. ;

, , . , Variant Object;

;

. , Option Explicit.

. . , . , .

, , Access. . , Access Err, , , . . Err .

. , . , ( , ). :

1. , , ( ), .

"" On Error, , .

, Visual Basic On rr, , , Exit Sub, Exit Function, Exit Property, End Sub, End Function End Property . , , , . , On Error: On Error GoTo 0.

On Error GoTo , , .

2. , , .

, . . Exit Sub, Exit Function Exit Property. .

, Select Case If...Then...Else. , , , , " ". , . Else Case Else.

Number Err , . Err Select Case If.Then.Else, .

. , Description Err, , . Access. , , Err Number Err.Description.

3. .

, , :

Resume [0] , , , . , .
Resume Next , , . , , , , ( ).
Resume , , , . , .
Err.Raise Number:= . , Access .

 

3.4. MS SQL Server





:


: 2018-10-14; !; : 213 |


:

:

: , , , , .
==> ...

1511 - | 1384 -


© 2015-2024 lektsii.org - -

: 0.037 .