nested IIf formula

D

D Adams

I thought I had the answer.
I have a ZIP code table I named "ZIP DISTANCE" with 31
columns(ZIP_CODE, Store 4, Store 6, Store 7, etc.)that
i've used to store the distance to each one of my store
locations. Now I want to pick the shortest distance for
each ZIP code (to send to SBC for call routing). I was
using this IIf statement for the first 3 locations, but as
I add more locations the query gets to large for access
(I've got 30 locations). Is ther another way to solve this
problem?

IIf((IIf([ZIP DISTANCE]![Store 4]<[ZIP DISTANCE]![Store 6],
[ZIP DISTANCE]![Store 4],[ZIP DISTANCE]![Store 6]))<[ZIP
DISTANCE]![Store 7],(IIf([ZIP DISTANCE]![Store 4]<[ZIP
DISTANCE]![Store 6],"4","6")),"7")

Thanks for any help,
Darrel in Texas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top