Prev | Current Page 2075 | Next

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

"Access 2007 Bible"

..
screentip=???Login Name???
getItemCount=???onGetLoginCount???
getItemLabel=???onGetLogins???
imageMso=???Private???
onAction=???onLogin???>

The id, label, screentip, and imageMso attributes define the DropDown control??™s appearance.
The getItemCount and getItemLabel populate the DropDown??™s list. The onAction
specifies the callback that handles the control??™s action.
1110
Professional Database Development Part IV
The VBA callbacks for a typical DropDown are shown in the following code. Two primary callbacks
are required for a DropDown. The first sets the count of items to appear in the list, and the second
actually populates the list.
Public Sub onGetLoginCount( _
control As IRibbonControl, ByRef count)
count = Nz(DCount(???*???, ???tblSalesPerson???), 0)
End Sub
Public Sub onGetLogins( _
control As IRibbonControl, index As Integer, ByRef label)
Dim strName As String
strName = Nz(DLookup(???SalespersonName???, _
???tblSalesPerson???, ???SalesPersonID = ??? & index + 1), ??????)
label = strName
End Sub
The first callback (onGetLoginCount) gets the count of items to be placed on the DropDown??™s
list.


Pages:
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087
gry dla dziewczyn Maty izolacyjne karuzele sklep wędkarski Monitory