Information générale
Catégorie:
Codage, syntaxe et commandes
I think that's what I did (here is my exact code):
If This.DisplayValue <> This.Value
Insert into Cfaddres (ad_city) ;
Values (This.DisplayValue)
Endif
but several odd things happen. 1) If after typing my new city, then before saving it I click on the combo box whatever I had entered is wiped out (autoerase feature:). Assuming I don't do that, but type in a city "Test", then hit my save button, I first get the message that my changes were saved successfully, and I see "Test" sitting there in the combobox. But then if I go to a previous record and come back to the one supposedly just 'saved' the combobox is blank again. If I try to go to a previous record again (leaving the combobox control blank), this time I get a trigger failure on update. The only thing which works is for me to select one of the displayed items in the combobox.
Sylvia
(I used an Insert into table instead of append blank)
>
If you put this in the lostfocus event it should work...
>
>if this.value != this.displayvalue
>
> append blank in yourtablename
> replace fieldname with this.displayvalue in yourtablename
>
>endif
Précédent
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