isladogs
MVP / VIP
- Local time
- Today, 17:40
- Joined
- Jan 14, 2017
- Messages
- 18,261
Do you have a button click event when the user logs in?
Alternatively an after_update event?
Whichever you use, I'm now unclear if its a listbox or a subform you want updated (as you've mentioned both)
You just need to set the subform record source or listbox row source to be filtered by PMEmployeeID value. Something like
Me.lstList.RowSource = "SELECT v.JobID, v.JobNumber as [Job #], v.JobDescription as [Description] FROM vwJobList AS v WHERE PMEmployeeID = " & Me.UserID & " ORDER BY v.JobNumber;"
Add code to the event code to make the subform/listbox visible & if necessary requery it
Alternatively an after_update event?
Whichever you use, I'm now unclear if its a listbox or a subform you want updated (as you've mentioned both)
You just need to set the subform record source or listbox row source to be filtered by PMEmployeeID value. Something like
Me.lstList.RowSource = "SELECT v.JobID, v.JobNumber as [Job #], v.JobDescription as [Description] FROM vwJobList AS v WHERE PMEmployeeID = " & Me.UserID & " ORDER BY v.JobNumber;"
Add code to the event code to make the subform/listbox visible & if necessary requery it