Hi,
I have an appliction in which,there are many User for whom different accesss right are given for different menuitem.Now, when a user Login in, he/she should have access to those many nos. of menuitems(names stored in database)
this is the sample of code:
strQry = "select MenuName from table1 "
mycommand = New SqlCommand(strQ ry, myConnection)
dr = mycommand.Execu teReader
If LCase(g_UserNam e) = "sa" Then
While dr.Read
mnuCurr = Me.Controls(dr( 0))
If mnuCurr Is Nothing Then
Err.Clear()
Else
mnuCurr.Enabled = True
End If
End While
dr.Close()
End if
Please Help me....Thanking in advance
I have an appliction in which,there are many User for whom different accesss right are given for different menuitem.Now, when a user Login in, he/she should have access to those many nos. of menuitems(names stored in database)
this is the sample of code:
strQry = "select MenuName from table1 "
mycommand = New SqlCommand(strQ ry, myConnection)
dr = mycommand.Execu teReader
If LCase(g_UserNam e) = "sa" Then
While dr.Read
mnuCurr = Me.Controls(dr( 0))
If mnuCurr Is Nothing Then
Err.Clear()
Else
mnuCurr.Enabled = True
End If
End While
dr.Close()
End if
Please Help me....Thanking in advance
Comment