Alastair,
Since you're using a speed button to accomplish all this, can you not in your speed button on-click eep: 1) Get the current control's component ID 2) Save that component ID in a variable 3) Do the rest of the work Now when you click on the speed button it should always capture and save the component ID of the control that had focus when the button was clicked. Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr Sent: Wednesday, July 22, 2009 12:42 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: I'm not understanding a Form Property properly Hope you enjoyed your week away from it all, Karen - in this case not taking focus away from the current field was entirely intentional but I need to know, at least the program needs to know, which control to paste to therefore I need to obtain that info and that works fine the first time. It's just the second time that the RBase variable is out of sync if I can put it that way. On the other hand, I'll look at approaching the process another way and intentionally take focus away and go back again to see if I can get what I want so, maybe, you've sparked an idea... Regards, Alastair. ----- Original Message ----- From: [email protected] To: RBASE-L Mailing List <mailto:[email protected]> Sent: Wednesday, July 22, 2009 2:46 PM Subject: [RBASE-L] - Re: I'm not understanding a Form Property properly Alastair: I'm coming in this conversation late (had a rare one-week vacation where I ignored anything business-related). I see you're using enhanced speed buttons. I stopped using speed buttons years ago since I learned that speed buttons do not cause a "loss of focus" (ie, it thinks you're still in the previous field). There probably is a good reason for wanting this behavior, but I don't personally know .... Have you tried changing to a bit button to see if it works better? Karen Thanks, Razzak, for your sample application: Managing MDI Forms Using PROPERTY Commands. Using that I have been able to confirm that I have the right syntax for my commands and the right text is transferred to the vAction variable which, naturally, produces the expected result: the form and field object take focus as required. What I am still getting, however, is the identity of the last field object held in the R:Base variable from the command: SET VAR vColID = .RBTI_FORM_COMPID after returning to the first form and having focus on the control specified. I suspect that the reason for this is something to do with not "doing" anything on the first form after returning to it hence the only error message that I am getting: "component [name] not found in current form" which is absolutely correct as it isn't there. The sequence is: Open (first) form; click on DBEdit (placed in Scrolling Region); click on Enhanced Speed button "BrowseNames" (outside Scrolling Region) which launches second form; select data on second form then click on one of four Enhanced Speed buttons on second form; [data from first form is correctly placed on first form automatically] click on Enhanced Speed button "BrowseNames" which launches second form again - NB: no mouse or keyboard action in the DBEdit which has focus; select data on second form then click on one of four Enhanced Speed buttons on second form; [data NOT placed on form as the RBTI_FORM_COMPID variable contains the identity of the last field on the second form] As I indicated, I suspect that this is the expected behavior. I have found a work-around so that the vColID is not changed on returning to the first form but I'm not sure that this work-around will be effective in all circumstances. I would be grateful if my suspicions could be confirmed or otherwise. Thanks ®ards, Alastair. _____ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.23/2254 - Release Date: 07/22/09 05:59:00

