WHERE CLAUSE

M

Martin

Hi,

I have a query that I need to assign a WHERE clause within the statement.
This is below:

Monthly Update: IIf([tblData]![RELATIONSHIP_TYPE]="*BR*",[tblData2]![Jan
'09]* [tblData3]![Rate] WHERE [tblData3]![Location Type] = "BR",0)

Does anyone know where I am going wrong here?

Any help woudl be appreciated.
 
K

Ken Snell

WHERE clauses go in the WHERE box in the query grid, not in the Field box,
assuming that the WHERE clause is to apply to the entire query.

If you want this "WHERE" clause to apply within just the IIf function:

Monthly Update: IIf([tblData]![RELATIONSHIP_TYPE]="*BR*" AND
[tblData3]![Location Type] = "BR",[tblData2]![Jan
'09]* [tblData3]![Rate], 0)
 
J

John Spencer

I am guessing that you need to replace an equal with a like and add the rest
of the "where" into the IIF expressions first argument.

Monthly Update: IIf([tblData]![RELATIONSHIP_TYPE] LIKE "*BR*" AND
[tblData3]![Location Type] = "BR",[tblData2]![Jan '09]* [tblData3]![Rate], 0)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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