>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