|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Reference to a control, by its name in a StringA1 I have A1 in a String Varibale I need to accomplish this ------ Me.A1.Enabled = True ------ in this way ----- var_aname As String = "A1" Me.var_aname.Enabled = True ----- any ideas, thank you !! Manek me.controls("a1").enabled
Manekurt wrote: Show quoteHide quote > Hello to all, I need to change a property of a menuitem called for example > A1 > I have A1 in a String Varibale > > I need to accomplish this > ------ > Me.A1.Enabled = True > ------ > > > in this way > > ----- > var_aname As String = "A1" > Me.var_aname.Enabled = True > ----- > > > any ideas, thank you !! > > Manek You need to write your own function to do this. See
http://www.devx.com/vb2themax/Tip/19623. Show quoteHide quote "Manekurt" <mar_c_o_***@gamacom.com.ar> wrote in message news:%23DDoCsglGHA.2136@TK2MSFTNGP04.phx.gbl... > Hello to all, I need to change a property of a menuitem called for example A1 > I have A1 in a String Varibale > > I need to accomplish this > ------ > Me.A1.Enabled = True > ------ > > > in this way > > ----- > var_aname As String = "A1" > Me.var_aname.Enabled = True > ----- > > > any ideas, thank you !! > > Manek > > > This is the name of the control or the name of the variable ?
Have you double checked you design ? You may want to explain what you is your final goal. -- Patrice "Manekurt" <mar_c_o_***@gamacom.com.ar> a écrit dans le message de news: %23DDoCsglGHA.2***@TK2MSFTNGP04.phx.gbl...Show quoteHide quote > Hello to all, I need to change a property of a menuitem called for example > A1 > I have A1 in a String Varibale > > I need to accomplish this > ------ > Me.A1.Enabled = True > ------ > > > in this way > > ----- > var_aname As String = "A1" > Me.var_aname.Enabled = True > ----- > > > any ideas, thank you !! > > Manek > > > Hello, I need to enable or not, menuitems in a menu depnending the user
permission, whish is set in a table of the DB so I go through the table records, and depending the name of the control , y enable or not the menu Something like this TABLE PERMISSION MEUNUNAME - ACCESS A1 true A2 true A3 false A4 true Something like this So I need this me.NAMEOFCONTROLFROMMENUITEMNAME.enabled = ACCESS Thank you Show quoteHide quote "Patrice" <scr***@chez.com> escribió en el mensaje news:elvejyglGHA.3816@TK2MSFTNGP02.phx.gbl... > This is the name of the control or the name of the variable ? > > Have you double checked you design ? You may want to explain what you is > your final goal. > > -- > Patrice > > "Manekurt" <mar_c_o_***@gamacom.com.ar> a écrit dans le message de news: > %23DDoCsglGHA.2***@TK2MSFTNGP04.phx.gbl... >> Hello to all, I need to change a property of a menuitem called for >> example A1 >> I have A1 in a String Varibale >> >> I need to accomplish this >> ------ >> Me.A1.Enabled = True >> ------ >> >> >> in this way >> >> ----- >> var_aname As String = "A1" >> Me.var_aname.Enabled = True >> ----- >> >> >> any ideas, thank you !! >> >> Manek >> >> >> > > |
|||||||||||||||||||||||