@Chris.Wiseman: I think the problem lies in how you set your criteria's AttributeType property. Both are set to "pibvUAttrBatchID", which suggests you want to filter on the UnitBatch IDs (twice). If - as the rest of your code suggests - you want to filter on the UnitBatch's Unit and Product, then you should set y.BatchItemCriteria.AttributeType(0) = pibvUAttrUnitName and y.BatchItemCriteria.AttributeType(1) = pibvUAttrProduct. Make sure your UnitBatch ID filter is set to *, in Design mode.
Let us know how it works!
As a side note, you may have noticed PI BatchView is not provided as part of the vCampus Kit of PI Products; this is a voluntary omission, not a mistake. If you're wondering why, well it's simply because PI Batch is in the process of being replaced with Event Frames - and so are the PI Batch clients. With its focus on best practices, vCampus tries to make sure people don't develop applications that will become obsolete in a foreseeable future (or at least prevent them from doing so without the knowledge ). vCampus (and the set of products available on vCampus) reflects OSIsoft's long-term vision in terms of how people should use and access PI technologies.
I am by no means a Batch guru, but I ran into something that you might want to try. Batch seems to work better if you do SetSearchCriteria(crit, FALSE) and then explicitly call ExecuteSearch(). I'm not sure exactly why this is, one of the Batch developers explained it to me at one point, but most of it went over my head. Something to do with the fact that if the Search criteria changes is gets marked as non-active or something...