Enabling toolbar buttons [RESOLVED]
HeY All wonder if you can shed some light on this one
I have a parent MDI form called MainApp
contained within this MainApp is a public function which simply gets passed an int ie 1,2,3,4 etc
then i have a case statment like
select case blah(ByVal MyValue)
case 1
Me.MasterBar.Buttons(0).Enabled = True
case 2
Me.MasterBar.Buttons(1).Enabled = False
etc
I am calling this function from a form called frmLogin like this
frmMainApp.DoLogin(IntUserPriv)
the frmMainApp is defined in a module as a public global variable
So basically my app opens the main MDI parent and that has onLoad event for frmLogin when user logs in all the checks and stuff is done in the frmLogin and if everything is cool the function doLogin is called with their user type passed in, i know the user type is being passed ok because stick a msgbox in there to test it however it will not set the buttons to either be enabled or disabled,,,, any ideas ????
ok this is whats happening
I have a main MDIParent that opens a child onload Login form.
the log in form does what it needs to do then passed a ref back to a public function on the MDIParent
this is the function including test crap so excuse the crap
Public Function DoLogin(ByVal MyValue)
'Function to highlight the required toolbars
Select Case MyValue
Case 0
btnLoginout.Enabled = True
MsgBox("Case found 0")
Case 1
btnLoginout.Enabled = True
MsgBox("Case found 1")
Case 2
btnLoginout.Enabled = True
MsgBox("Case found 2")
Case 3
btnLoginout.Enabled = True
MsgBox("Case found 3")
Case 4
btnLoginout.Enabled = True
MsgBox("Case found 4")
Case 5
btnLoginout.Enabled = True
MsgBox("Case found 5")
Case Else
MsgBox("Sorry cant determin your rights to access this software, Please call tech support on " & strTelephone & "")
End Select
End Function
shed any light on this one ????