code for next record

tjr222

Registered User.
Local time
Today, 12:53
Joined
Jun 12, 2002
Messages
30
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.
 
It depends on what you are trying to acheive. Do you want to display the results and if so, how, or just use the count for a purpose.
 
Yes I would Like to display the results just as another string. The string will read "contract awarded", and it should go in a field 'notes' on the subform. So, on the main form, after the user clicks in a checkbox, I would like the code to go to the subform (with same id only) and search the field 'company' for a match to a string they select from a combobox. Then if it matches the string above should go in the record that has the matching 'company' field and print the stin "contract awarded" in the field 'notes'. I hope I didn't make this too confusing, but the trouble I am really having is getting to the subform and searching ONLY the with ID that matches form's ID. Anyway thanks for the quick response, and hopefully you can help.
 

Users who are viewing this thread

Back
Top Bottom