base836ball
Programmer
- Nov 9, 2005
- 3
OK what I have is a date field and a total field(which adds the total of 3 other text fields)
What I am trying to do is if stock # is 1799512 then only add 2.5, and if the date is between 9/9/2005 and 11/9/2005 add 2.5, and if greater than 11/9/2005 then add 4.5. Here is what I have
=IIf([Stock]=1799514,[Hauling]+[Storage]+[Additional]+[Towing]+2.5,Switch([Date]>="09/09/2005"
And
[Date]<="11/07/2005",[Hauling]+[Storage]+[Additional]+[Towing]+2.5,[Date]>"11/07/2005",[Hauling]+[Storage]+[Additional]+[Towing]+4.5))
And it doesnt work
It adds 4.5 to everything. If set [Date] = "09/09/2005" then it add 2.5 to that day only, but if i use AND it adds 4.5 to everything
What I am trying to do is if stock # is 1799512 then only add 2.5, and if the date is between 9/9/2005 and 11/9/2005 add 2.5, and if greater than 11/9/2005 then add 4.5. Here is what I have
=IIf([Stock]=1799514,[Hauling]+[Storage]+[Additional]+[Towing]+2.5,Switch([Date]>="09/09/2005"
And
[Date]<="11/07/2005",[Hauling]+[Storage]+[Additional]+[Towing]+2.5,[Date]>"11/07/2005",[Hauling]+[Storage]+[Additional]+[Towing]+4.5))
And it doesnt work
It adds 4.5 to everything. If set [Date] = "09/09/2005" then it add 2.5 to that day only, but if i use AND it adds 4.5 to everything