Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quirky view
Message
From
30/04/1998 08:05:10
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00095818
Message ID:
00095934
Views:
28
>>Hi everyone,
>>
>>I've got a form grid which uses a view as the record source. There are 3 columns in the grid. 2 have comboboxes as their current controls so my users can pick a value from a list, the third column has a simple text control.
>>
>>I'm having a strange problem. I can change the text field value, and the value is carried over to the view. But if I change the text field value, then go to one of the two comboboxes to change their values after I lose focus in the combo, I also lose the previous change I made to the text field as well. It acts as if it's reverting to the value when I first opened the form.
>>
>>Here's a sample of my lost focus code in my comboboxes (I've used the same code in other places without any problems):
>>
>>============================================
>>local lview, lcontid, lcodeno, lconttype
>>lcodeno = allcodes.codeno
>>lview = this.parent.parent.recordsource
>>lcontid = &lview..contid
>>lconttype = &lview..contype
>>
>>select internet
>>if lconttype # lcodeno
>>	locate for contid = lcontid
>>	if found()
>>		replace contype with lcodeno
>>		requery('lvinternet')
>>	else
>>		=messagebox("Problem with internet.contype.combo1, lostfocus")
>>	endif
>>endif
>>
>>select allcodes
>>set filter to
>>set order to codeno
>>============================================
>>
>>FYI: contid is my key field, contype is the associated code for the value that's displayed in the combobox (the user's new selection).
>>
>>I've checked my view and Send Updates is true, the text field that's losing the data does have "Updatable = true", and contid is the KeyField.
>>
>>Any clue what might be happening here?
>>
>>Many thanks!
>>
>>Mandy
>
>Mandy, in the code above I don't see a "tableupdate()" command to flush the data in the view buffers before you requery.
>
>In the same vein, be sure you flush the tables underlying your view IF they are buffered.
>
>HTH

Thanks Barbara, I'll give it a look. It sounds likely since this is acting as if the view is reverting to the text field's original state when I change one of the combobox columns' data. I'll keep you posted! :)

Mandy
Previous
Reply
Map
View

Click here to load this message in the networking platform