Selecting all records if certain value

  • Thread starter Thread starter andrew3254
  • Start date Start date
A

andrew3254

I have a selection form with a pull down menu of courses listed for that
person.

I want to make it so an "Admin" can see all courses but other users only see
those specific to them. How do I do this in a query?
 
Write a public function that returns the current user's ID (assuming that
this will be same as the PersonID in your table), and name that function
GetCurrentUserID.

Then add a criterion to the field that lists the person's ID:
=GetCurrentUserID() Or GetCurrentUserID() = "Admin"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top