Need help with EXPRESSIONS (1 Viewer)

Jker

New member
Local time
Today, 12:30
Joined
Dec 8, 2023
Messages
4
I have the following expression in my report that is working correctly:

=IIf([product_compare_cost1]<[product_cost] And [product_compare_cost1]<[product_compare_cost2] And [product_compare_cost1]<[product_compare_cost3] And [product_compare_cost1]<[product_compare_cost4] And [product_compare_cost1]<[product_compare_cost5],"BEST","")

what i want to do is to check if product_compare_cost1 is not null. If it is NOT NULL then continue with the above expression ...... I dont know how to work this condition into this expression
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:30
Joined
Oct 29, 2018
Messages
21,474
Hi. Welcome to AWF!

You could try something like:
Code:
IIf(IsNull([product_compare_cost1]),"",<Insert Your Other IIf() Expression Here>)
 

plog

Banishment Pending
Local time
Today, 11:30
Joined
May 11, 2011
Messages
11,646
I know I said this on your other post. But let me give it one last shot and then I'll leave you to your spreadsheet database.


Access is not Excel With Forms. It's an actual database. Why not use it like it's intended and get its full functionality? If you properly lay out your tables you can then write a query that easily finds the "Best" price. You've implemented a hack around your poor structure. It would actually be less work and less wonky if you used Access as intended.
 

Users who are viewing this thread

Top Bottom