I have a main form and subform connected by the field 'ID'. I would like to run code that looks at a field 'Company' with the ID the same as the record that the user is on the main form. In otherwords sometimes the subform has 1 entry sometimes it has 20 entries, I would like to know if someone knows the code to go through each record and compare the contents of 'company' to a string. Thanks for you help in advance.