Hi All,
I have a simple question concerning a calculation field a a subform.
In my form (frm_UserInterface), I have 2 tab control, "Runway Information" and "Obsctacles + Procedure Information".
-In the tab Runway Information, I have a field called TORA_FNL. (TORA_FNL is a number.)
-In the tab Obstacles, I have a subform about my obstacles. In the subform I have a field (ObDistRef), that can have the value "BR brake release" or "LO liftoff end of runway". I also have a field "Dist" that depends on the value chosen in "ObDistRef" and the value of TORA_FNL.
The equation is :
IF ObDistRef = BR Brake release THEN Dist=Dist + TORA_FNL
ELSE ObDistRef= LO liftoff end of runway THEN Dist=Dist-TORA_FNL
I would like the VB code to go in the on click event on the "ObDistRef" field. I can't seem to get the code to get the value of TORA_FNL.
So I tried writing this :
Private Sub ObDistRef_Click()
If Me.ObDistRef = "BR brake release" Then
Me.Dist = Me.Dist + Me.TORA_FNL
Else : Me.Dist = Me.Dist - Me.TORA_FNL
End If
End Sub
As the Me.TORA_FNL doesn't work properly, I tried replacing "Me.TORA_FNL" with "[frm_UserInterface].[Form]![Me.TORA_FNL]" but it doesn't work.
So i just can't manage to get the code to get the value of TORA_FNL in the Runeway Information tab. Hoping someone can help me.
Thank you for your help.
Mat
I have a simple question concerning a calculation field a a subform.
In my form (frm_UserInterface), I have 2 tab control, "Runway Information" and "Obsctacles + Procedure Information".
-In the tab Runway Information, I have a field called TORA_FNL. (TORA_FNL is a number.)
-In the tab Obstacles, I have a subform about my obstacles. In the subform I have a field (ObDistRef), that can have the value "BR brake release" or "LO liftoff end of runway". I also have a field "Dist" that depends on the value chosen in "ObDistRef" and the value of TORA_FNL.
The equation is :
IF ObDistRef = BR Brake release THEN Dist=Dist + TORA_FNL
ELSE ObDistRef= LO liftoff end of runway THEN Dist=Dist-TORA_FNL
I would like the VB code to go in the on click event on the "ObDistRef" field. I can't seem to get the code to get the value of TORA_FNL.
So I tried writing this :
Private Sub ObDistRef_Click()
If Me.ObDistRef = "BR brake release" Then
Me.Dist = Me.Dist + Me.TORA_FNL
Else : Me.Dist = Me.Dist - Me.TORA_FNL
End If
End Sub
As the Me.TORA_FNL doesn't work properly, I tried replacing "Me.TORA_FNL" with "[frm_UserInterface].[Form]![Me.TORA_FNL]" but it doesn't work.
So i just can't manage to get the code to get the value of TORA_FNL in the Runeway Information tab. Hoping someone can help me.
Thank you for your help.
Mat