Ok . . . try this.
If you don't already have a Module, you'll have to create one.
Then - type in "Option Explicit" at the top.
Then - paste in the following [you can take out the comments - they were to help me keep track of the logic as I was going]:
Code:
Function Find_Lowest_Price(Price1 As Currency, Price2 As Currency, Price3 As Currency) As Currency
If Price1 = 0 Then
If Price2 = 0 Then
If Price3 = 0 Then
Find_Lowest_Price = 0 'All three 0.
Else
Find_Lowest_Price = Price3 'Price1 = 0, Price2 = 0, Price3 > Zero.
End If
Else '*** Price1 = 0, Price2 > Zero.
If Price3 = 0 Then
Find_Lowest_Price = Price2 'Price1 = 0, Price2 > 0, Price3 = 0.
Else '*** Price3 > Zero
If Price2 > Price3 Then
Find_Lowest_Price = Price3
Else
Find_Lowest_Price = Price2
End If
End If
End If
Else '*** Price1 > 0
If Price2 = 0 Then
If Price3 = 0 Then
Find_Lowest_Price = Price1 'Price1 > 0, Price2 = 0, Price3 = 0.
Else 'Price1 > 0, Price2 = 0, Price3 > 0.
If Price3 > Price1 Then
Find_Lowest_Price = Price1
Else '*** Price3 < Price1.
Find_Lowest_Price = Price3
End If
End If
Else '*** Price1 > 0, Price2 > 0.
If Price2 > Price1 Then
Find_Lowest_Price = Price1
Else
Find_Lowest_Price = Price2
End If
End If
End If
End Function
Now - when you run your query - if you've put a field in there that calls this function:
Code:
Lowest_Price: Find_Lowest_Price([Price1],[Price2],[Price3])
the field will display a 0 if all three are 0's - OR - if there are two 0's - it will show the one that is not 0 - and if there are two or more prices greater than 0 - it will show the smallest one.
Let me know if this works.