knuckelhead
Technical User
I need an extra statement to make this work. I have a table with 2 ranges of data. The qry needs 2 things to seek the proper records range. I only have 1 thing programmed so far. that's my problem.
I presently have the Qry use PACKUNITS to look at the 2 ranges. you can see PackUnits in the middle of the below Qry. I need a second thing to make this work: PACKid.
PackUnitsHR2: IIf(Nz([Batchsize])=" ",0,Val(DLookUp("Nz([PackUnitHr])","[tblPack]",[PackUnits] & "Between [LowerPackWeight] and [UpperPackWeight]")))
Here is a sample from tblPack:
------------------------------------------------
PackIDHr PackID LowerPackWeight UpperPackWeight PackUnitHr
4110 201 0.00 0.19 1800.00
4112 201 0.19 0.75 900.00
4114 201 0.75 2.00 600.00
4116 201 2.00 999999.00 500.00
4130 205 0.00 5.00 400.00
4133 205 5.00 999999.00 300.00
4140 209 0.00 999999.00 300.00
4211 221 0.00 999999.00 75.00
------------------------------------------------
So, if my PackID is 201 and my PackUnits are 2.34, then i want the answer to be 500.
In the Qry, I need to get the combination of PackID and PACKUNITS to be the basis to look for PackUnitHr from the table. I currently only figured out Packunits, which is not enough.
thanks
I presently have the Qry use PACKUNITS to look at the 2 ranges. you can see PackUnits in the middle of the below Qry. I need a second thing to make this work: PACKid.
PackUnitsHR2: IIf(Nz([Batchsize])=" ",0,Val(DLookUp("Nz([PackUnitHr])","[tblPack]",[PackUnits] & "Between [LowerPackWeight] and [UpperPackWeight]")))
Here is a sample from tblPack:
------------------------------------------------
PackIDHr PackID LowerPackWeight UpperPackWeight PackUnitHr
4110 201 0.00 0.19 1800.00
4112 201 0.19 0.75 900.00
4114 201 0.75 2.00 600.00
4116 201 2.00 999999.00 500.00
4130 205 0.00 5.00 400.00
4133 205 5.00 999999.00 300.00
4140 209 0.00 999999.00 300.00
4211 221 0.00 999999.00 75.00
------------------------------------------------
So, if my PackID is 201 and my PackUnits are 2.34, then i want the answer to be 500.
In the Qry, I need to get the combination of PackID and PACKUNITS to be the basis to look for PackUnitHr from the table. I currently only figured out Packunits, which is not enough.
thanks