Looks like _CUROBJ can only be used within a valid or when. I tried setting _CUROBJ after the READ but nothing happened.
Thanks for the reply Peter. Wayne On Wed, Jun 1, 2016 at 9:16 AM, Peter Cushing <[email protected]> wrote: > > On 01/06/2016 13:55, Wayne Yeung wrote: > >> Greetings, >> I have an old app with forms created using Define Window. >> Textboxes are created by @ Get. >> I know many of you will tell me to upgrade which I'm doing but I still >> need >> to support the existing app. >> >> Well, here is my question: >> What is be best way to mimic Setfocus() for a @ Get control? >> Is this even possible without using the valid clause? >> My goal is to centralize validation in one place before saving to the dbf. >> >> What you need is _CUROBJ = <expn> > > From the help file: > > _CUROBJ Example > > > The following program example demonstrates how GET objects are numbered > and how _CUROBJ can be used to return the object number of the current > object. Press Tab or the arrow keys to select different objects. > Pressing F2 displays the object number for the current object. > > CLEAR > SET TALK OFF > STORE 1 to x, y, z > ON KEY LABEL F2 @ 12,2 SAY 'Object # ' + STR(_CUROBJ) && Show # > @ 4,2 GET x PICTURE '@*R \<Apples;\<Oranges;\<Limes' && Radio > @ 2,2 GET y && Get field > @ 8,2 GET z PICTURE '@^ \<Pears;\<Bananas;\<Pineapples' && Popup > READ CYCLE > ON KEY LABEL F2 && Reset F2 key to default > SET TALK ON > > > > > This communication is intended for the person or organisation to whom it > is addressed. The contents are confidential and may be protected in law. > Unauthorised use, copying or disclosure of any of it may be unlawful. If > you have received this message in error, please notify us immediately by > telephone or email. > www.whisperingsmith.com > > Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. > Tel:0161 831 3700 Fax:0161 831 3715 > London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960 > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] 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/CAJDnZHfx5x9HBFD3hm56-4aFk=HKr=dde+kxtzpxv6kdegd...@mail.gmail.com ** 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.

