WHERE CLAUSE

  • Thread starter Thread starter Martin
  • Start date Start date
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.
 
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)
 
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
 
Back
Top