If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
WHERE CLAUSE
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. |
#2
|
|||
|
|||
WHERE CLAUSE
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) -- Ken Snell http://www.accessmvp.com/KDSnell/ "Martin" wrote in message ... 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. |
#3
|
|||
|
|||
WHERE CLAUSE
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 Martin wrote: 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. |
Thread Tools | |
Display Modes | |
|
|