I have a table with a list of government bids in it.

I have a second table with the line items for each bid.

I have a third table with commodity codes for each line item.

I have a fourth table with a list of all vendors.

I have a fifth table with a list of all commodities serviced by each
vendor.

I need to display a list of government bids where the only records
displayed are those bids with matching commodities to the line items for
the logged in vendor.

My current logic is:

* Build an array of logged in vendor's commodities.
* Loop through line items and if I find a matching commodity, display
the corresponding bid.

My problem is... since a bid can have more than one line item, multiple
instances of the bid are displayed.

I tried code to add each matching bid to an array then "weed out" the
duplicate bid numbers, but it's extremely slow.

I am not sure I'm doing this correctly... I can post code, if that
would help.

Any suggestions?

--Dave