I have the following expression in a query and it keeps asking for Enter Parameter value. ANy ideas?
Result: IIf(IsNumeric(Staff![Portfolio])=[P&D Manager]!Dept,"Not good","ok")
Thanks
I have the following expression in a query and it keeps asking for Enter Parameter value. ANy ideas?
Result: IIf(IsNumeric(Staff![Portfolio])=[P&D Manager]!Dept,"Not good","ok")
Thanks
the message should be telling which parameter it is asking for - in this case the implication is either one or both of Staff![Portfolio] or [P&D Manager]!Dept do not exist. Without knowing more about the rest of the query, it is not possible to comment further other than suggest you use the expression builder.
Other comments
Your code looks weird - IsNumeric(Staff![Portfolio]) with return either true or false (-1 or 0) - so to get a match [P&D Manager]!Dept needs to be either -1 or 0
using non alphanumeric characters in your field and table names (i.e. [P&D Manager]) can cause unexpected problems even with using square brackets so best to avoid - it might be causing your issue here
I'm not sure using "!" as a separator is relevant here, try changing them to "."
A little more info here. The main table is called Staff. In it there is a field called P&D Manager and that is a lookup to a table called P&DManager and in it s a list of managers. Obviously teh P&DManaager in the staff table is a a number field, but the P&D Manager in the P&D Manager in the P&D Manager table is text. So when I use the IIF to say if P&D Manager is the same as P&D Manager in the staff table.
Hope that helps
regret lookups don't work that way - you need to add your P&DManager table to your query. Lookups seem like a great idea initially but actually cause more trouble than they are worth - take a look at this thread http://access.mvps.org/access/lookupfields.htmIn it there is a field called P&D Manager and that is a lookup to a table called P&DManager and in it s a list of managers