trying to build an expression in a query

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have two tables that are seperate for a time*** program. I have it
set up that when you enter a name and date via a combo box on a form it
automatically opens up into another form where you would input hours
worked a day, based on a list generated from a table. What I would
like to do is add a query to that list within the second form that only
returns certain records based on a name. Example if you are doing the
time*** for Amy Morse, only some project ids would be available for
her to choose from. So basically this is what would like to happen

Task_Id is the combobox list with the project codes listed

and under row source for this combobox i have

SELECT [qryItemList].[Task#], [qryItemList].[T_Des1],
[qryItemList].[T_Des2] FROM qryItemList WHERE
(((qryItemList.[Task#])<>1600016));

the list works fine, it returns the whole list minus the 1600016 task
id.

Now I want to query just the list minus this task when your name is amy
morse or some other name, which you would get for the first form combo
box ([Forms]![First Form]![employee].Name)

Something like this
SELECT [qryItemList].[Task#], [qryItemList].[T_Des1],
[qryItemList].[T_Des2] FROM qryItemList WHERE [Forms]![First
Form]![employee].Name = "Amy Morse",
[qryItemList].[Task#], <>1600016

Any advise appreciated

Thanks

Kim

.


Quantcast