Pulling Last Quote Number, Date, and Unit Cost from Quotes

A while back I posted the question:
Last Quoted, Last Quote price, Last Quote number

I want to thank Adam Szymanski for his help, I have recently gone back into that thread and marked it as the solution.

So when I used his suggestion everything worked for the Customer that I was trying to get the information for.

Recently though I was testing a different customer and was NOT getting the most recent quote - well sort of, let me explain.

  1. I received the most recent quote AND other quotes (not all of them, just a few)
  2. The information from both quotes have the correct information, Date, Unit Cost and Qty listed on their respective quotes.

The only difference I see is that this happens when the part number I’m targeting is on a quote with multiple parts. The information IS correct for the part number I am targeting - Date, Unit Cost and Qty. I also do get the most recent quote, BUT I am also getting one or two other quotes (but not all quotes for that part number).

So, I don’t understand what my BAQ is telling the data to do when there are multiple part numbers on a single quote.

Any ideas?