Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form behaviour with fields wierd
Message
From
17/07/2003 19:22:31
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00810950
Message ID:
00811327
Views:
10
Hi Caroline

Thanks very much for your reply. Yes Buffering (3) is on and this must be causing the behaviour I explained. I just moved the call to the Lost focus like you suggested and all is well.

When I have the time I will try your other suggestion about
>This.SetFocus()
?ThisForm.Refresh()

as there is not much to update and it looks better when this occurs from the Interactive change than from the lost focus.

Thanks again

Bernard

>Bernard,
>Is there any Data Buffering set?
>
>I think the problem with the ThisForm.Refresh() is that you are calling it from the InteractiveChange field so the field has not lost focus so the value has not been updated. Try doing
This.SetFocus()
>ThisForm.Refresh()
>
>Just be aware that if the user is typing values of more that 1 character this will probable cause some problems.
>HTH
>Caroline
>
>
>>Can someone please explain this to me:
>>
>>As an example I have this form with a spinner and 2 textboxex.
>>
>>1. spnTerm has as its control source field from table - contract.term
>>2. txtTerm has the same control source
>>3. txtResult has as its control source - contract.result
>>
>>In the InteractiveChange of the spinner, I have the foll code:
>>
>>Replace contract.result WITH contract.term*2
>>
>>Now I would expect the value in the contract.result field as well as the contract.term field to change when I change the value in the spnTerm. THIS IT DOES. BUT the values of the two txtBoxes do not refresh and display wrong/old info.
>>
>>So If I change the value of the spnTerm from 1 to 2 the values in the table change but on screen I still see the old values in the textboxex. When I click on them individually (gotfocus) they refresh, not otherwise though they have their control sources set to fields in the same record.
>>
>>Weirder still is that if I issue a refresh, the spinner REVERTS to its old value.
>>So if I change the code in the InteractiveChange of the spinner to:
>>
>>
>>Replace contract.result WITH contract.term*2
>>ThisForm.refresh
>>
>>Then when I change the value of the spinner from say 1 to 2 it changes back to 1 almost immediately. This is because of the Form Refresh.
>>
>>How else can I make the code in the spinner update the table as well as the textboxes on screen?
>>
>>Please help as this is very frustrating.
>>
>>I always thought that when an object was databound to a field changing the object value changed the field and vice versa. This does not seem to be the case....
>>
>>Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform