Actions assignable to buttons in DataWindow objects
Table 20-2 shows
the actions you can assign to a button in a DataWindow object. Each
action is associated with a numeric value (the Action DataWindow
object property) and a return code (the actionreturncode event argument).
The following code in the ButtonClicked event displays the
value returned by the action:
|
1 |
MessageBox("Action return code", actionreturncode) |
|
Action |
Effect |
Value |
Action return code |
|---|---|---|---|
|
User Defined (default) |
Allows the developer to program the ButtonClicked |
0 |
The return code from the user’s |
|
Retrieve (Yield) |
Retrieves rows from the database. Before retrieval |
1 |
Number of rows retrieved. -1 if retrieve fails. |
|
Retrieve |
Retrieves rows from the database. The option |
2 |
Number of rows retrieved. -1 if retrieve fails. |
|
Cancel |
Cancels a retrieval that has been started with |
3 |
0 |
|
Page Next |
Scrolls to the next page. |
4 |
The row displayed at the top of the DataWindow -1 if an error occurs. |
|
Page Prior |
Scrolls to the prior page. |
5 |
The row displayed at the top of the DataWindow -1 if an error occurs. |
|
Page First |
Scrolls to the first page. |
6 |
1 if successful. -1 if an error occurs. |
|
Page Last |
Scrolls to the last page. |
7 |
The row displayed at the top of the DataWindow -1 if an error occurs. |
|
Sort |
Displays Sort dialog box and sorts as specified. |
8 |
1 if successful. -1 if an error occurs. |
|
Filter |
Displays Filter dialog box and filters |
9 |
Number of rows filtered. Number < 0 if an error occurs. |
|
Delete Row |
If button is in detail band, deletes |
10 |
1 if successful. -1 if an error occurs. |
|
Append Row |
Inserts row at the end. |
11 |
Row number of newly inserted row. |
|
Insert Row |
If button is in detail band, inserts |
12 |
Row number of newly inserted row. |
|
Update |
Saves changes to the database. If the update |
13 |
1 if successful. -1 if an error occurs. |
|
Save Rows As |
Displays Save As dialog box and saves rows |
14 |
Number of rows filtered. Number < 0 if an error occurs. |
|
|
Prints one copy of the DataWindow object. |
15 |
0 |
|
Preview |
Toggles between preview and print preview. |
16 |
0 |
|
Preview With Rulers |
Toggles between rulers on and off. |
17 |
0 |
|
Query Mode |
Toggles between query mode on and off. |
18 |
0 |
|
Query Sort |
Allows user to specify sorting criteria (forces |
19 |
0 |
|
Query Clear |
Removes the WHERE clause |
20 |
0 |