Hey all,
I have a small change that I am working on for a control console form I have. Currently, the form includes a sub-form that gives a list of all the users logged into the database.
I am trying to get an image frame to load the corresponding ID picture for each user with the hopes that I can make the sub-form invisible and just use the images to refresh as people log on and off.
I have put together some code for the onload event, that I plan to refresh everytime the sub-form is refreshed. So far it will ONLY show me the last user to log in, i am assuming the most current record. Is this even possible or am i missing something in the code? Ive tried it as individual If statements per user and using the elseif was my most recent attempt...any help would be great!
If Me![Current-Users]![Logged In] = "candy" Then
Me.Image84.Visible = True
Me![Image84].picture = "\\..\candy.jpg"
ElseIf Me![Current-Users]![Logged In] = "echo" Then
Me.Image85.Visible = True
Me![Image85].picture = "\\..\echo.gif"
ElseIf Me![Current-Users]![Logged In] = "xenia" Then
Me.Image86.Visible = True
Me![Image86].picture = "\\..\xenia.jpg"
ElseIf Me![Current-Users]![Logged In] = "applejacks" Then
Me.Image87.Visible = True
Me![Image87].picture = "\\..\applejacks.jpg"
Else
Me.Image87.Visible = False
Me.Image86.Visible = False
Me.Image85.Visible = False
Me.Image84.Visible = False
End If
I have a small change that I am working on for a control console form I have. Currently, the form includes a sub-form that gives a list of all the users logged into the database.
I am trying to get an image frame to load the corresponding ID picture for each user with the hopes that I can make the sub-form invisible and just use the images to refresh as people log on and off.
I have put together some code for the onload event, that I plan to refresh everytime the sub-form is refreshed. So far it will ONLY show me the last user to log in, i am assuming the most current record. Is this even possible or am i missing something in the code? Ive tried it as individual If statements per user and using the elseif was my most recent attempt...any help would be great!
If Me![Current-Users]![Logged In] = "candy" Then
Me.Image84.Visible = True
Me![Image84].picture = "\\..\candy.jpg"
ElseIf Me![Current-Users]![Logged In] = "echo" Then
Me.Image85.Visible = True
Me![Image85].picture = "\\..\echo.gif"
ElseIf Me![Current-Users]![Logged In] = "xenia" Then
Me.Image86.Visible = True
Me![Image86].picture = "\\..\xenia.jpg"
ElseIf Me![Current-Users]![Logged In] = "applejacks" Then
Me.Image87.Visible = True
Me![Image87].picture = "\\..\applejacks.jpg"
Else
Me.Image87.Visible = False
Me.Image86.Visible = False
Me.Image85.Visible = False
Me.Image84.Visible = False
End If