Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement