Runtime Error 2447 ????? (1 Viewer)

gmatriix

Registered User.
Local time
Today, 08:41
Joined
Mar 19, 2007
Messages
365
Hello All,

Im am getting this error "Runtime 2447 There is an invalid use of the .(dot) or ! operator or invalid parentheses."

Do not know why I am getting this. It has an error on this code on the
Code:
Private Sub RawData_LostFocus()

If IsNull(Me.RawData) Then Me.Text103 = 0
If Me.RawData <= Me.UL And Me.RawData > Me.UCL Or Me.RawData < Me.LCL And Me.RawData >= Me.LL Then Me.Text103 = 2
If Me.RawData <= Me.UCL And Me.RawData >= Me.LCL Then Me.Text103 = 1
If Me.RawData > Me.UL Or Me.RawData < Me.LL Then Me.Text103 = 3

End Sub

It did work when I have 1 form with the code in it. But when I added another form identical to that one just bound to another table, I start getting this error.:banghead:

How can it work fine then now im getting this error???

Any Ideas???

Thanks
 

missinglinq

AWF VIP
Local time
Today, 08:41
Joined
Jun 20, 2003
Messages
6,423
I'd try replacing the second line with

Code:
If (Me.RawData <= Me.UL And Me.RawData > Me.UCL) Or (Me.RawData < Me.LCL And Me.RawData >= Me.LL) Then Me.Text103 = 2
Linq ;0)>
 

MarkK

bit cruncher
Local time
Today, 05:41
Joined
Mar 17, 2004
Messages
8,181
curious if something like this would work . . .
Code:
    Me.text103 = 0
    Select Case Me.RawData
        Case Is > Me.UL, Is < Me.LL
            Me.text103 = 3
        Case Me.LCL To Me.UCL
            Me.text103 = 1
        Case Me.UCL To Me.UL, Me.LL To Me.LCL
            Me.text103 = 2
    End Select
. . . seems simpler in some ways, but not sure about replacing <= and > with "to".

Anyway, thought I'd throw it out there.
 

gmatriix

Registered User.
Local time
Today, 08:41
Joined
Mar 19, 2007
Messages
365
Hello All,

Does any know why the error 2447 " There is an invalid use of the . (dot) or ! operator or invalid parentheses" occurs?

I just having a terrible time with code that works fine on one form and not on another.

Any Ideas?:banghead:
 

TJPoorman

Registered User.
Local time
Today, 06:41
Joined
Jul 23, 2013
Messages
402
my guess would be that your text boxes are named after fields on the recordsource. try renaming your textboxes to something like txt***** and updating your code to reflect this.
 

gmatriix

Registered User.
Local time
Today, 08:41
Joined
Mar 19, 2007
Messages
365
Well,

That does make sense what you said however im still getting this error. This is so frustrating!

It is also has a error on this line

Code:
Me.Graph194.axes(2).MinimumScale = Me.LL - 0.0008
Me.Graph194.axes(2).MaximumScale = Me.UL + 0.0006

It should work....it works on my other form that is identical.

Any Ideas?:confused:
 

MarkK

bit cruncher
Local time
Today, 05:41
Joined
Mar 17, 2004
Messages
8,181
fwiw, I commonly name controls the same as the fields in the recordsource and never get errors about that
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:41
Joined
Sep 12, 2006
Messages
15,653
i have noticed sometimes that you can refer to fields in the forms recordsource directly.

then for some reason this stops, and you have to place them on the form to use them. I suspect this might be happening.

I could never work out why sometimes the controls have to placed on the forms.
 

gmatriix

Registered User.
Local time
Today, 08:41
Joined
Mar 19, 2007
Messages
365
Thanks everyone for helping....I guess this is just one of those mystery Microsoft problems. I got tired of messing around with it.

So I just set my chart scale to auto for both forms. Not exactly what I wanted but ...oh well...close enough...
 

jason97m

New member
Local time
Today, 05:41
Joined
Apr 10, 2011
Messages
7
This happens when a value somewhere on your form throws an error like #Name. If you can remove that, the error should go away.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:41
Joined
Feb 28, 2001
Messages
27,179
Jason... you DO realize you answered a thread from 2013?
 

Users who are viewing this thread

Top Bottom