Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intermittent control source not storing
Message
From
28/06/2005 12:40:11
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
27/06/2005 09:55:53
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026692
Message ID:
01027113
Views:
12
>The code below demonstrates the general layout. A form with a pageframe and 6 pages. The only difference is in our app the save and close button are on an activex object toolbar (dbiTech toolbar). This occurs intermittently, but the user always follows the same steps when it happens and when it doesn't.
>
>The user will launch the form, key something into text1 on page1 and then not press enter or tab but while the cursor is still residing in the textbox on page1 click on page2 with the mouse. There are other controls on page1 but they are filled by default and the user does not have to tab through them unless they need to change the values. After the user enters the value into the textbox on page1, as mentioned, the user does not leave the control but clicks on the tab for the next page. Then the user continues on completing all fields on all pages and finally clicks on a save button on the toolbar. The value is not stored in the variable that is the controlsource for text1 on page1 for some reason. It does not happen everytime. To workaround the problem, I am storing the value to the variable in the interactivechange event which seems to work the majority of the time. The variable exists before the form is loaded and is set as the control source for the textbox on page1.

Maybe, just maybe, the old trick for toolbars may work here. In page1.deactivate, before it starts, check its .activecontrol. If it's not null, setfocus() to it - that should actually cause it to lose focus first. That was forcing the update of the controlsource since VFP5 and should still work.

Um... not sure this will give the desired effect. If you setfocus(), then you may actually prevent the user to switch pages. Maybe you'll just have to live with your .interactivechange workaround.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform