I am new to VB code and am trying to do the following code in access 2000 but doesn't work? Can anyone help
Private Sub Site_Works___Labour_AfterUpdate()
If (Forms![Structure Data Input]![GRIP Stage] = 7) Then
Forms![Structure Data Input].[Costs Subform]![GRIP Stage 7 Total] = Forms![Structure Data Input].[Costs Subform]![Site Works - Labour]
End If
End Sub
'Site Works_ Labour' is a control in a subform [Costs Subform] of parent form [Structure Data Input]
Essentially I want to test the field GRIP Stage 7 on the parent form and perform a calculation on the subform components only based upon the result.
Many thanks,
Osx
Private Sub Site_Works___Labour_AfterUpdate()
If (Forms![Structure Data Input]![GRIP Stage] = 7) Then
Forms![Structure Data Input].[Costs Subform]![GRIP Stage 7 Total] = Forms![Structure Data Input].[Costs Subform]![Site Works - Labour]
End If
End Sub
'Site Works_ Labour' is a control in a subform [Costs Subform] of parent form [Structure Data Input]
Essentially I want to test the field GRIP Stage 7 on the parent form and perform a calculation on the subform components only based upon the result.
Many thanks,
Osx