Nope - the SetFocus - I only put it into the LostFocus Methods of Style &
Color fields. When I put it in there - CRASH - take it out - No Crash!

I looked at the link below - and I tried to follow this one suggestion - his
alternate to SetFocus - with a command like (in the end of the Valid):
        RETURN ThisForm.Text1

Now - previously I was trying something similar - using just the number 1 -
as was talked about in a previous thread here. And, it didn't work. So - I
tried the suggestion above - putting in the Object name as shown above -
and, of course - guess what!?!? It didn't work!

Man is this frustating. So - for now - just so I could Move On - I did the
Kludge. At the end of each valid - for Style & Color - I just turned Enabled
to False for those Text Boxes - and sure enough - that worked. Problem is -
if user wants to go back and Edit those fields again - they can't! But, I
may worry about that at a later time...

-K-


-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard
Kaye
Sent: Wednesday, June 19, 2013 1:18 PM
To: profoxt...@leafe.com
Subject: RE: A Focus Problem - Not a Lack of Concentration!

You must have a setfocus call in a when, valid, etc method somewhere.
Perhaps some inherited code?

http://www.vfug.org/Newsletters/AvoidingTheCannotCallSetFocusFromWithinAWhen
ValidErrorMessage.htm

--
rk

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Kurt
Wendt
Sent: Wednesday, June 19, 2013 1:08 PM
To: profoxt...@leafe.com
Subject: RE: A Focus Problem - Not a Lack of Concentration!

OK - Rafael - now I really AM Going to Pull My Hair OUT!!!

I did as you suggested - I put code into the LostFocus event - for the Style
and the Color fields. Well - I just got the well known error: "Cannot call
SetFocus from within a When, Valid, RangeHigh or RangeLow event."

Which I find to be QUITE Peculiar - since, in fact - I put the new line of
code into the SetFocus Method - which is NOT Listed in the Error above! 

So - I have no clue as to why its giving that particular error...

-K-


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/6571092312404E6DBB5FDC995165C7A0@Programming2
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to