Hi.
There are existing menus inside the form. My program is to define which user has the right access to which menu. These information will be retrieved from a DAtabase.
For instance, i retrieve userID 123, who can only access menu1, menu2, menu3(the menu name of the form). Hence, i tell the program that the menu1, menu2 and menu3 to be set as enabled. In order to make the program dynamically, the collection method that i realized that is not so dynamic. If i use array method, can i directly assign the menu name (which retrieved from Database) to the object menu:
Redim arrItem (10) as menu
while not rs.eof
i = 0
arrItem(i) = rs.fields("Item"
--(1)
arrItem.enabled = true
i = i +1
loop
(1) : this may cause a problem since the casting is not allowed
do you have any idea? pls help.
There are existing menus inside the form. My program is to define which user has the right access to which menu. These information will be retrieved from a DAtabase.
For instance, i retrieve userID 123, who can only access menu1, menu2, menu3(the menu name of the form). Hence, i tell the program that the menu1, menu2 and menu3 to be set as enabled. In order to make the program dynamically, the collection method that i realized that is not so dynamic. If i use array method, can i directly assign the menu name (which retrieved from Database) to the object menu:
Redim arrItem (10) as menu
while not rs.eof
i = 0
arrItem(i) = rs.fields("Item"
arrItem.enabled = true
i = i +1
loop
(1) : this may cause a problem since the casting is not allowed
do you have any idea? pls help.