Value Property

See AlsoEXIDO6                 Example1NCBDVT>Low

Applies To

Check box9P3BU5, command buttonXJSPC0, Field objectKU5EEE, horizontal scroll bar1JSJOS7, option buttonJYBO08, vertical scroll bar1JSJOS7.

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 Max6GHZL6 and Min6GHZL6 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 types17F82T4.

         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 boxIntegerDOKXHY (Enumerated)

         Command button, option buttonIntegerDOKXHY (Boolean)

         Field objectsany one of the Field data types17F82T4

         Horizontal and vertical scroll barsIntegerDOKXHY


See Also

Help:

Max, Min Properties6GHZL6

Data Access11WWTV1

 

Programmer's Guide:

Chapter 3, "Creating and Using Controls"


Value Property Example

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