See Also Example
Applies To
Check box, command button
Description
Check box, option buttondetermines the state of the control.
Command buttondetermines whether the button is chosen; not available at design time.
Field objectdetermines the content of a field.
Horizontal and vertical scroll barsdetermines the current position of the scroll bar, whose return value is always between the values for the Max and Min properties, inclusive.
Usage
{ [form.]control | field}.Value[ = setting ]
Setting
The Value property settings are:
Check box0 is Unchecked (default), 1 is Checked, and 2 is Grayed (dimmed).
Command buttonTrue indicates the button is chosen; False (the default), indicates the button is not chosen. Setting the Value property to True in code invokes the button's Click event.
Field objectrestricted only by the Field data types .
Horizontal and vertical scroll barsset values between 32,768 and 32,767 to position the scroll box.
Option buttonTrue indicates the button is selected; False, the default, indicates the button is not selected.
Remarks
A default property of an object is assumed, and does not need to be specified in code. For example, Field is the default property of any Recordset, and Value is the default property of a Field object. This makes the two statements below equivalent:
Dn.Fields("PubID").Value = X
Dn.("PubID") = X
The first statement specifies the default properties; the second statement assumes them.
Data Type
Check boxInteger (Enumerated)
Command button, option buttonInteger (Boolean)
Field objectsany one of the Field data types
Horizontal and vertical scroll barsInteger
Help:
Max, Min Properties
Data Access
Programmer's Guide:
Chapter 3, "Creating and Using Controls"
The example displays a horizontal scroll bar's numeric value in a text box. To try this example, paste the code into the Declarations section of a form that has a text box and horizontal scroll bar. Press F5 to run the program and then click the scroll bar.
Sub Form_Load ()
HScroll1.Min = 0 ' Initialize scroll bar.
HScroll1.Max = 1000
HScroll1.LargeChange = 100
HScroll1.SmallChange = 1
End Sub
Sub HScroll1_Change ()
Text1.Text = Format (HScroll1.Value)
End Sub