Advertising banner:
 
 
 A321
 
81203_43854_21.png 81203_43840_19.png


Method
Definition
Syntax
Example
AddItem
Adds an item to an existing list field.
[formname].fieldname.AddItem(string)
You can use AddItem to simplify the use of dropdown lists by automating the addition of new items to the list. AddItem finds the item specified in the string parameter and adds to the list. AddItem can only be used on editable and static selection lists and affects the List attribute.
DblClick
Calls an event when the user double-clicks a field.
You can associate code with the DblClick method whenever you wish it to be executed by double-clicking.
Sub DblClick()
...
End Sub
RemoveItem
Removes an item from an existing list field.
[formname].fieldname.RemoveItem(string)
You can use RemoveItem to simplify the use of dropdown lists by automating the deletion of items from the list. RemoveItem finds the item specified in the string parameter and removes it from the list, leaving all other entries the same. RemoveItem can only be used on editable and static selection lists and affects the List attribute.
RemoveItem (an item in the list)
SelLength
Sets the length of the selected text in a text field.
[formname].fieldname.SelLength(numeric expression)
If a starting point for the selection of text is not set with SelStart, the selected text begins at the first character. If the numeric expression is larger than the number of characters in the text buffer, SelLength selects all of the text in the field. If numeric expression is set to 0, the cursor is placed at the location specified by SelStart (or character 0 if SelStart is not called first) and no text is selected.
Sub Click()
        ...
        StringField1002.SelLength(25)   'select the 1st 25 chars in StringField 1002
        StringField1002.SelLength(0)    '0 = no selection; place cursor at SelStart
        StringField1002.SelLength(5)    'select characters 7 - 12
        ...
End Sub
SelStart
Sets the starting position in the code for a text selection.
[formname].fieldname.SelStart(position)
where position is a numbered string expression.
Use SelStart to specify the character at which to begin a SelLength text selection. Use SelStart(0) to set the selection at the beginning of the text field.
Sub Click()
        ...
        StringField1002.SelStart(5)     'set the starting position for text selection
        StringField1002.SelStart(7)     'set the starting position for text selection
        ...
End Sub
SetFocus
Sets the application focus of a field.
If the form the field is on is shown, but not active, the form is activated and the focus is set. If the field receiving focus is hidden or protected, this method has no effect.
[formname].fieldname.SetFocus
Example
Sub Click()
        StringField1002.SetFocus        'set focus to StringField 1002
End Sub


hirosue Shino Web Site