So you have two combo boxes, and each combination of selections, has a distance stored in your database ? Wouldn't it be more efficient to store their locations and calculate distance ? Anyhow, you need to find the entry in your DB that has this pair of values, so either search the table you have, or select just that one value with the two fields that match. Hard to say more without knowing your DB schema.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog