Query Criteria

J

JNariss

Hello,

I am running a bunch of queries so I can make my reports. This one
query I am trying to run is a bit difficult for me to figure out.

I have 3 tables:

Request
Approval
User

I have forms for these tables:
Request Form
Approval Form

The Approval Form is used when a manager goes into the request and
wants to approve it and assign it to an analyst. In my Approval Form I
have a field of User ID which brings up the name of the manager in the
user table if their ID is choosen. I want to run a query for people to
go into the database and view all the requests by whomever approved
them when they type in the name of the manager.

How can I make this happen?

I have created a query with all fields from the Request Table
(necessary) and added in the User ID from the Approval Table.

I need to know what to type into the criteria field so that when a
person types in the mangers name it should bring up all the requests
that they approved.

Thanks,
Justine
 
M

[MVP] S.Clark

The OpenForm method of the DoCmd object has a Where parameter, where you can
put the where clause.

So, you can do something like this:

DoCmd.OpenForm "FormName", where:="SupervisorID=" &
forms!frmname!txtSupervisor
 

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

Top