Hi
I have a main form "Tender" linked to a subform "Project" - which shows single records at a time. The user has navigation keys to move through all Projects related to a single Tender in the main form.
The parent-child relationship is between a field "Tender" - However I also have a second field that is recorded in both tables which is the same for both Project and Tender (field AREA). For reasons best left out, this field is required in both tables and Tender Area must always equal Project Area.
Therefore, if some one enters a record into the tender table and creates a new project I simply set the value from the Area field in Tender to the Project Area field - no problem, this works fine.
But, how can I update records linked to a tender if the person realises they have entered the wrong area in the Tender Table? I need to update all the records associated with that Tender to show the correct Areas in the Project table.
On the OnChange event of the Area field in the Tender Form, I put the following:
Forms!FRM_TENDERS!SFM_PROJECTS!AIRPORT_NAME.VALUE = Forms!FRM_TENDERS!AIRPORT_NAME.VALUE
however (not unexpectedly!!) the only record that in the subform was the one being viewed at the time the Tender Area field is updated - the other records remained the same!
Please help - I am sure this is probably very simple and a really stupid question. I shall continue trying to solve this but any help/advice would be very gratefully received!
Best wishes
Emma
[This message has been edited by Emma (edited 06-14-2001).]
I have a main form "Tender" linked to a subform "Project" - which shows single records at a time. The user has navigation keys to move through all Projects related to a single Tender in the main form.
The parent-child relationship is between a field "Tender" - However I also have a second field that is recorded in both tables which is the same for both Project and Tender (field AREA). For reasons best left out, this field is required in both tables and Tender Area must always equal Project Area.
Therefore, if some one enters a record into the tender table and creates a new project I simply set the value from the Area field in Tender to the Project Area field - no problem, this works fine.
But, how can I update records linked to a tender if the person realises they have entered the wrong area in the Tender Table? I need to update all the records associated with that Tender to show the correct Areas in the Project table.
On the OnChange event of the Area field in the Tender Form, I put the following:
Forms!FRM_TENDERS!SFM_PROJECTS!AIRPORT_NAME.VALUE = Forms!FRM_TENDERS!AIRPORT_NAME.VALUE
however (not unexpectedly!!) the only record that in the subform was the one being viewed at the time the Tender Area field is updated - the other records remained the same!
Please help - I am sure this is probably very simple and a really stupid question. I shall continue trying to solve this but any help/advice would be very gratefully received!
Best wishes
Emma
[This message has been edited by Emma (edited 06-14-2001).]