Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convincing a combobox to requery itself
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00244431
Message ID:
00244433
Vues:
21
>I created a class based on a combobox to display a list of cities. The RowSourceType is 3-SQL. I build the SQL statement in the init and replace the RowSource.
>
>Init ex:
>
>local lSource
>lSource = "SELECT * FROM city WHERE !DELETED() ORDER BY 1 INTO Cursor " + This.Name
>This.RowSource = lSource
>This.Refresh
>
>This works fine.
>
>In the right click event I placed the following:
>
>local lcNewCity
>lcNewCity = proper(EditTextBox("", "Add new city"))
>Insert into city (cityname) value (lcNewCity)
>This.requery
>This.refresh
>This.value = lcNewCity
>This.Displayvalue = lcNewCity
>
>When I run the form the combo displays all the current records, however if I rightclick and add a city it doesn't show up? I browsed the actual cursor and it's not there. It does exist in the base table, and will show up in the combo the next time I run the form.
>
>Any ideas?
>
>TIA

I guess you work with buffered table. Select-SQL retrieves records from the base table, skipping all buffered changes until you Tableupdate().
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform