Dragonchaser
Registered User.
- Local time
- Today, 13:46
- Joined
- May 15, 2007
- Messages
- 31
Hi All,
I would like have a control in a form return a value when 3 fields in the form match 3 different fields in a table. The value a want returned is the 4th field in the same record as the 3 matching criteria from the form. I've tried a long dlookup expression with no luck. It always returns the value in the first row.
=DLookUp("[FlangeWidth]","[SingleChamberPipeCalculationData]","[FlangeSize] =" & [Forms]![SingleChamberForm]![MeterRunSize] & And "[Pressure] = " & [Forms]![SingleChamberForm]![PressureRating] & " And [FlangeType]= '" & [Forms]![SingleChamberForm]![UpstreamFitting] & "'")
[MeterRunSize] & [Pressure] are numeric and [UpstreamFitting] is a string.
I've attached a picture as they're worth 1000 words.
Am I using the wrong function all together?
Any light anyone can shed on what I'm doing wrong would be greatly appreciated.
Best Regards,
Mark
I would like have a control in a form return a value when 3 fields in the form match 3 different fields in a table. The value a want returned is the 4th field in the same record as the 3 matching criteria from the form. I've tried a long dlookup expression with no luck. It always returns the value in the first row.
=DLookUp("[FlangeWidth]","[SingleChamberPipeCalculationData]","[FlangeSize] =" & [Forms]![SingleChamberForm]![MeterRunSize] & And "[Pressure] = " & [Forms]![SingleChamberForm]![PressureRating] & " And [FlangeType]= '" & [Forms]![SingleChamberForm]![UpstreamFitting] & "'")
[MeterRunSize] & [Pressure] are numeric and [UpstreamFitting] is a string.
I've attached a picture as they're worth 1000 words.
Am I using the wrong function all together?
Any light anyone can shed on what I'm doing wrong would be greatly appreciated.
Best Regards,
Mark