.


:




:

































 

 

 

 


.




15, . , Access, .

, Price () Product () , PriceChanger ( ). , Access Price PriceChanger:

Price.BackColor = vbRed

Access :

Forms("Product").Price.BackColor = vbRed

Access Forms (), . ( Product , .) Product, Price BackColor ( ).

. Access , :

Forms!Product!Price!BackColor = vbRed

Access . . , , .

, , . 17 , , .

. 16.1 , Visual Basic.


16.1.

Value () . , Value . , , . .
Enabled ( ) True () False () . False, , , ( , Value). , ""
Visible () True () False () , , , . False (), . . , State ()
ForeColor ( ) BackColor ( ) ( ) , ( )
Left () () . Left () . () .
Width () Height ()
FontName () FontSize ( ) () , . FontName (, "Arial"), a FontSize (, 10)
FontBold ( ) FontI-talic () True () False () ( )
Picture* () , .

16.1 ()

Text* () . , Value. - , . Value , , Text ,
Caption* () . , , .
IternsSelected* ( ) - , , . . ItemsSelected , , , Value

* .

 

 

. , . , , . Requery () .

 

, . , .

 

, . , . . . .

Refresh ( ):

Form.Refresh


. , , . . Visual Basic IntelliSense (. 16.7).

 


. 16.7. Move . , Visual Basic , . (Left) ,

 

, . , . , :

Description.Move 0, 0

 

. 16.2 .

 

 

16.2.

SetFocus ( ) , , , . . ,
Undo () () . . ,

16.2 ()

Recalc ( )
Refresh* ( ) , , . , , , (. 18),
Requery* () , , , . Refresh, , .

* , .

 

 

, , , . . . 15.4.

: . , , , . :

Private Sub ButtonOfPower_Click ()

. . , .

(On Key Press) , , - . , ( ASCII.)

, (On Key Press), Access , :

Private Sub MyTextBox_KeyPress(KeyAscii As Integer) End Sub

, (On Key Press) . , KeyAscii, .


, :

Private Sub MyTextBox_KeyPress(KeyAscii As Integer)

MsgBox " : " & KeyAscii
End Sub

. . .

 

. , . ( , .) . " " 17.

 

(On Mouse Move), . , :

 

Private Sub SomeControl_MouseMove(Button As Integer, _

Shift As Integer, X As Single, Y As Single)

End Sub

 

. Button , . Shift , <Shift>, <Ctrl> <Alt>. , , X Y ( ).

 

 

, Visual Basic, , , . , .

 

, , Access. VESA2 Help: Microsoft Visual Basic (Help → Microsoft Visual Basic Help). : Visual Basic for Applications Language ReferenceMicrosoft Forms Visual Basic ReferenceReference. , Access ( Objects) , , Access ( Events, Methods Properties).

2 VBA . . .






:


: 2016-03-28; !; : 455 |


:

:

, , 1:10
==> ...

1655 - | 1578 -


© 2015-2024 lektsii.org - -

: 0.021 .