U
unclemuffin
Using Access 2007 I have setup nested forms.
Master Form is frmOrder which has a subform frmCut which has a subofrm
frmRoll.
On frmCut i have a control named BiasSize
On frmRoll I want to refer to the control BiasSize on frmCut
I have the following code in the AfterUpdate event of another control
on frmRoll:
Private Sub cmdActualYardsEntered_AfterUpdate()
Dim intBiasSize As Single
Dim BiasMultiplier As Single
intBiasSize = Forms![frmCut]!BiasSize ' Error occurs here
If intBiasSize > 0 Then
If intBiasSize = 1.5 Then BiasMultiplier = 43
If intBiasSize = 3 Then BiasMultiplier = 20
Me![cmdActualyd] = Me![cmdActualYardsEntered] * BiasMultiplier
Else
Me![cmdActualyd] = ([cmdInchesOnSpread] + [InchesOfWaste]) /
36
End If
End Sub
I am getting an error: Run-time error '2450': Microsoft Office Access
can't find the form 'frmCut' referred to in a macro expression or
Visual Basic code.
frmCut is the correct name of the form.
I am a newbie and kind of jumped into VBA without some of the
underlying knowledge of how to refer to different objects. So please
forgive me if this is a simple question.
Brent
Master Form is frmOrder which has a subform frmCut which has a subofrm
frmRoll.
On frmCut i have a control named BiasSize
On frmRoll I want to refer to the control BiasSize on frmCut
I have the following code in the AfterUpdate event of another control
on frmRoll:
Private Sub cmdActualYardsEntered_AfterUpdate()
Dim intBiasSize As Single
Dim BiasMultiplier As Single
intBiasSize = Forms![frmCut]!BiasSize ' Error occurs here
If intBiasSize > 0 Then
If intBiasSize = 1.5 Then BiasMultiplier = 43
If intBiasSize = 3 Then BiasMultiplier = 20
Me![cmdActualyd] = Me![cmdActualYardsEntered] * BiasMultiplier
Else
Me![cmdActualyd] = ([cmdInchesOnSpread] + [InchesOfWaste]) /
36
End If
End Sub
I am getting an error: Run-time error '2450': Microsoft Office Access
can't find the form 'frmCut' referred to in a macro expression or
Visual Basic code.
frmCut is the correct name of the form.
I am a newbie and kind of jumped into VBA without some of the
underlying knowledge of how to refer to different objects. So please
forgive me if this is a simple question.
Brent