Prev | Current Page 1703 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"

By default, a message box contains a single
OK button, and the return value of the MsgBox() function is 1 when the OK button is clicked.
The return values of the different message box buttons are shown in Table 28-3.
TABLE 28-3
MsgBox Return Values
Button Pressed Constant Returned Value Returned
OK vbOK 1
Cancel vbCancel 2
Abort vbAbort 3
Retry vbRetry 4
Ignore vbIgnore 5
Yes vbYes 6
No vbNo 7
904
Professional Database Development Part IV
The form named frmMsgBoxDemo in the Chap28.mdb example database contains a
number of different varieties of message boxes and command buttons. You??™ll see how
the different VBA constants influence the command buttons displayed in message boxes and how
each command button returns a different value.
Creating and using a progress meter
Setting up and using a progress meter requires an initializing step, then incrementing the meter to its
next value. As you increment, you don??™t just increment a counter that is managed by SysCmd. You
must explicitly set the meter??™s value to a value between 0 and the maximum you set at initialization.


Pages:
1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715
monitor samsung apartamenty w górach giełda rolna wyposażenie sklepów monitory oferta