Sorry bout that, here's the big picture:
[partnum] [line] [proccode]
9594 STD temp1
9594 STD temp2
9212 STD temp4
9594 PGA temp5
1234 PGA temp6
9594 PGA temp7
okay the table looks like that but imagine like 900,000 more records. The user specifies a part number and a line. I first need to check if the part number exists. In my case, I'm looking for all of the part numbers that are 9594. Then after I find that part number I want to grab the "line" that the user specified, let's assume it's STD. I just need the quickest way (without having to go through 900,000+ records) to select and count only those records. Bottom line is I want to know if the part number exists and how many of those records with that particular part number is of the STD line.
I've done a Dlookup to check if the part exists and a Dcount to count the number of records that are both part number 9594 and line STD however I'm not sure if Dcount goes through all the records or somehow has a quicker algorithm that will pull records out faster than Select Count(*)
I hope this clears things up.