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
|
|||
|
|||
Translate if statement in query
Thank you for the feedback; I appreciate your help and the suggested
modifications, they are much better. I still have some questions that I need help clarifying. I understand that both statements are checking for null values and a null value means there is no valid data or the data is unknown. What I am trying to understand is what the statement does if the result is null and what the statement does if the result is not null. I am assuming if the result is null than the record will display a 0, however if the result is not null the record will display the number in the Average requested field. Am I correct? Also, do you know what adding the suffix to Demand so it becomes Demand_1 accomplishes? "KARL DEWEY" wrote: The query has table [Demand] twice, with second instance having suffix _1 to appear as [Demand_1] and they both check for nulls. The same could be accomplished like this -- New Request: Nz([Demand]![Average requested],0) Old Request: Nz(IsNull([Demand_1]![Average requested],0) -- Build a little, test a little. "Jazz" wrote: I took both of these if statements from a query in an access database and I am trying to interpret them. New Request: IIf(IsNull([Demand]![Average requested]),0,[Demand]![Average requested]) Old Request: IIf(IsNull([Demand_1]![Average requested]),0,[Demand_1]![Average requested]) My interpretation is that each statement in the query is giving a field name to the field and then doing something or nothing depending on the data in TABLE: Demand / FIELD: Average requested, but I am not sure what. Are you help to help me translate these statements completely? |
Thread Tools | |
Display Modes | |
|
|