I have an unbound combo box that pulls data from another field, and I would like to filter it so that some records do not show up for some users.
How would I write the code to filter the results?
I have an unbound combo box that pulls data from another field, and I would like to filter it so that some records do not show up for some users.
How would I write the code to filter the results?
The records must have a field you can use to filter with, such as EnterBy field that has user ID. Then you need to get the user ID when they open the project. You can have them enter ID on a login form or grab the network username with: VBA.Environ("USERNAME"). Access will not recognize the Environ() function but VBA will.
Search this forum on keyword Environ and poster June7 to view other threads I have responded to on this topic. Here are two:
https://www.accessforums.net/securit...ers-17894.html
https://www.accessforums.net/access/...ser-18344.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.