Conditions on one form affect another form

aldeb

Registered User.
Local time
Today, 06:32
Joined
Dec 23, 2004
Messages
318
Below is the code I have on Form open. What I am trying to accomplish is:

If the [Engineering Distribution] Field on subform ECNDetailfrm has a name in it,
I want the AssyExcessOneThree Field on Form CancelledPartsQryForm
to say YES] If the [Engineering Distribution is Blank I want the
AssyExcessOneThree Field to be blank.

When I used the code below I am getting a
Run-time Error 2448 you can't assign a value
to this object
when I try and open the form.

Maybe the code is at the wrong place. By the way the CancelledPartsQryForm is
a continuous form.

Any suggestions on how to accomplish what I am trying to do?

Code:
Private Sub Form_Open(Cancel As Integer)

If Forms!ECNBCNVIPfrm!ECNDetailfrm![Engineering Distribution] > Blank Then
Me.AssyExcessOneThree.Value = "yes"
Else
Me.AssyExcessOneThree.Value = ""
End If

End Sub
 
"Run-time Error 2448 you can't assign a value
to this object"

Is your text field "unbound" or is it "bound" to a controlsource?

You usually get the above error message when you try
to "assign a value" to a text field that is "bound" to a controlsource or
the controlsource is hard coded. If it is bound, delete the controlsource
to make it unbound.

Also try replacing "> Blank Then" in your code with "<> Null"
and see whether that works.
 

Users who are viewing this thread

Back
Top Bottom