Automating Tasks

tjr222

Registered User.
Local time
Today, 05:28
Joined
Jun 12, 2002
Messages
30
I have a form 'frmCurrentBid' and a subform 'frmSubCurrentBid', the forms are based on tables with a one to many relationship. The ID is the primary key in the main table and foreign key in the sub table. In the form 'frmCurrentBid' I have some general descriptive fields and a toggle box. In the 'frmSubCurrentBid' I have a field 'Company' and a field 'Notes'. (Also others but they are not important.
That being said, what I would like to do is when the user clicks on the toggle box in the main form, it will open up a form that has a combo box with all the names of companys (which corresponds to the 'Company' field in the subform). Anyway upon selecting a company I would like the follow items to happen:

1) Search in the subform that corresponds to the record which the used checked the toggle box in, for a match to the company they selected.

2) If these two match then enter a string in the field 'notes'

To make myself as clear as I can, say the user is in the main form and clicks the toggle box. Next a form will open and they will select a company, Company A for simplicity. The code I am trying to figure out should take Company A and search the subform with the same ID as the record the toggle box selected is in for a match to the company. If it finds it in that same subform there is a field notes which the string "contract awards" should be displayed.

I hope this makes sense and someone can help me with it, Thank you in advance.

- T.
 
You can use DoCmd.GotoRecord to do the search but I must admit I'm a little confused with what you're trying to accomplish after it finds the record.
 

Users who are viewing this thread

Back
Top Bottom