I'm quite new to VB programming. By the way, how to code the properties of a menu control programatically? For instance, i extract the menu name from a Database where this user is only allowed to access this menu component,say menu1. So inside the program, i exract the menu1 and set the Enabled properties to be true.
Do While Not rs.EOF
frmMain.Control = rs.Fields("AccessibleMenu")
'frmMain.Menu1.Properties("Enabled") = True
'frmMain.rs.Fields(0).Enabled = True
I think the above code was wrong since the type of fields cannot be match. Is there any way to cast the data type to be control type? I'm not sure VB can cast or not. Pls advise.