I am hoping someone can enlighten me on how to do this. I was wanting to put this expression (see below) in a query field but it's too long to fit apparently. I need to figure out total cost of a package based on number of acres. There are a lot of options so my expression becomes too lengthy. I've got a table that is called SES Packages that has item as row, package name as a field and then the quantity of each item in the package, as well as a cost per item column. I then have a query that figures out the total cost of each item row in the packages, this query is called SES Package Costs. Depending on the number of acres of a property it could need more than one type of package.
I'm sure there is a way to do this with either another table/query and some sort of lookup maybe. Right now I just can't wrap my brain around how to accomplish what I'm wanting to do. There also may be larger acreage options later on. I also have 8 different package options (Bronze, Bronze+Flow, Gold, Gold+Flow, Silver, Silver+Flow, Platinum and Platinum+Flow)
I hope all this makes senseTIA!
Bronze: IIf([Properties]![IrrigatedArea]<=1,[SES Package Costs]![SES-B16Cost],IIf([Properties]![IrrigatedArea] Between 1.01 And 1.76,[SES Package Costs]![SES-B24Cost],IIf([Properties]![IrrigatedArea] Between 1.75 And 2.51,[SES Package Costs]![SES-B36Cost],IIf([Properties]![IrrigatedArea] Between 2.5 And 4.51,[SES Package Costs]![SES-B48Cost],IIf([Properties]![IrrigatedArea] Between 4.5 And 5.51,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B16Cost],IIf([Properties]![IrrigatedArea] Between 5.5 And 6.26,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B24Cost],IIf([Properties]![IrrigatedArea] Between 6.25 And 7.1,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B36Cost],IIf([Properties]![IrrigatedArea] Between 7.0 And 9.1,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost],IIf([Properties]![IrrigatedArea] Between 9.0 And 9.76,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B16Cost],IIf([Properties]![IrrigatedArea] Between 9.75 And 10.51,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B24Cost],IIf([Properties]![IrrigatedArea] Between 10.5 And 11.26,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B36Cost],IIf([Properties]![IrrigatedArea] Between 11.25 And 13.26,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost],IIf([Properties]![IrrigatedArea] Between 13.25 And 14.26,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B16Cost],IIf([Properties]![IrrigatedArea] Between 14.25 And 15.1,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B24Cost],IIf([Properties]![IrrigatedArea] Between 15.0 And 15.76,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B36Cost],IIf([Properties]![IrrigatedArea] Between 15.75 And 17.76,[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]+[SES Package Costs]![SES-B48Cost]))))))))))))))))