Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding New Records
Message
 
À
05/07/1998 05:51:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00114309
Message ID:
00114326
Vues:
9
John,

Do you refresh the form after you insert a record?

>This sounds really weird, but it keeps happening: I have a form with multiple tabs, each of which pretty much deals with a separate table. Optimistic table buffering is set. Some of the tabs have grids. Adding records in those tabs works exactly as expected. However, on those tabs without grids, i.e., where the fields for one record are placed separately on the tab, adding records works as follows:
>
>If I try to add the first record for a specific client into a table, none of the controls are enabled, as if I were pointing to EOF. I am, however, pointing to the new record. If I go ahead and save it, my add method for that client works as expected from then on. However, if I change to a client that has no record in the target table, I must save a blank and then INSERT another before I can work with new records.
>
>The cmdAdd.Click method has the same simple lines of code for both grid and non-grid tabs, where ClCode is the foreign key:
>
>INSERT INTO /*TABLENAME*/ (ClCode) VALUES (Client.ClCode)
>This.Parent./*FIRST CONTROL ON TAB*/.Setfocus()
>
>A relationship to the parent is established in the DE and a filter on the ClCode is in place. (Removing the filter doesn't change anything.)
>
>Has anybody ever seen anything like this? I know I can devise a work-around, but this ain't right . . . . .
>
>TIA.
>John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform