Oops: Hit Send too soon.
I believe your first End If is in the wrong place. Try:
If DLookup("[User_Type]", "[tblVersion]", _
"[UserID] = '" & Environ("username") & "'") = "Admin" Then
TitleMSP.Visible = True
Label95.Visible = False
Label97.Visible = True
Label96.Visible = True
If Not IsNull(Me.TitleMSP) Then
TitleMSP.Visible = True
ContactUserID.Visible = True
ContactStatus.Visible = True
Label95.Visible = False
Label97.Visible = True
Label96.Visible = True
End If
Else
TitleMSP.Visible = False
ContactUserID.Visible = False
ContactStatus.Visible = False
Label97.Visible = False
Label96.Visible = False
Label95.Visible = True
End If
Incidentally, I always cringe when people use Environ("Username") to get the
current user, because it's trivial to reset its value for the duration of
your use of the Access application. You'd be much better off using the
GetUserName API call, as illustrated in
[URL="http://www.mvps.org/access/api/api0008.htm"]http://www.mvps.org/access/api/api0008.htm[/URL] at "The Access Web"
>> Stay informed about: if statement not working