Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
egghi
Starting Member
17 Posts |
Posted - 2006-10-16 : 15:39:55
|
Hi,I have a label called lblOpenAdmin on an Access form. If the logged in user's user role (user role is defined and stored on a SQL table called UserRol) is "PIPAdmin", the label will be visible to the user. My VBA was working earlier today, and I don't remember making any changes to it, but hey, it's not working now... Any help will be appreciated!Dim strAdmin As StringDim strWindowsUserstrAdmin = "'PIPAdmin'"strWindowsUser = Me.txtUserName.ValueIf DCount("WindowsUser", "UserRole", "WindowsUser= '" & strWindowsUser & "' AND UserRole IN (" & strAdmin & ")") <> 0 ThenMe.lblOpenAdmin.Visible = TrueElseMe.lblOpenAdmin.Visible = FalseEnd If |
|
|
|
|