rsbutterfly16
Registered User.
- Local time
- Today, 11:59
- Joined
- Jun 5, 2006
- Messages
- 77
hi guys i am working in customizing my current switchboard and i was wondering if there is any way to hide a button according to a user.. i currently have a tblusers with the username, switchboardid and itemnumber i want as a default, but i would also like to have a certain itemnumber to be hidden, is that possible?
this is the code i have in my switchboad and it works fine:
Private Sub Form_Open(Cancel As Integer)
txtUser_Name = GetUserName()
Dim intItem As Integer
Dim intSwitchbd As Integer
intItem = Nz(DLookup("[ItemNumber]", "tblusers", "[Userid] = '" & Me!txtUser_Name & "'"), 0)
intSwitchbd = Nz(DLookup("[SwitchboardID]", "tblusers", "[Userid] = '" & Me!txtUser_Name & "'"), 0)
Forms!Switchboard.Filter = "[ItemNumber] = " & intItem & " And [SwitchboardID] = " & intSwitchbd
Forms!Switchboard.Refresh
Me.FilterOn = True
any help will be apreciate it!!!
this is the code i have in my switchboad and it works fine:
Private Sub Form_Open(Cancel As Integer)
txtUser_Name = GetUserName()
Dim intItem As Integer
Dim intSwitchbd As Integer
intItem = Nz(DLookup("[ItemNumber]", "tblusers", "[Userid] = '" & Me!txtUser_Name & "'"), 0)
intSwitchbd = Nz(DLookup("[SwitchboardID]", "tblusers", "[Userid] = '" & Me!txtUser_Name & "'"), 0)
Forms!Switchboard.Filter = "[ItemNumber] = " & intItem & " And [SwitchboardID] = " & intSwitchbd
Forms!Switchboard.Refresh
Me.FilterOn = True
any help will be apreciate it!!!