Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add/change/delete grid/form
Message
De
04/10/1999 14:56:07
 
 
À
04/10/1999 13:45:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00272397
Message ID:
00272425
Vues:
21
I suspect that FormB use Private DataSession. Change it to Default DataSession and remove the table from the Data Environment.

HTH
>I have formA that has ADD/Edit/Delete command buttons and a grid
>that displays the data.
>
>My command buttons call FormsB where input is done.
>
>my Add button code is:
>
>select gidetail
>append blank in gidetail
>replace gidetail.sessionkey with gisum.sessionkey, gidetail.add_user with User, gidetail.lc_user with User do form gisclient
>go bottom in thisform.grid2.recordsource
>thisform.grid2.refresh()
>
>My Edit button Copde is:
>select gidetail
>If not EOF()
> Replace gidetail.lc_user with User, gidetail.lc_time with time(), ;
> gidetail.lc_date with date(), gidetail.upld_stat with 1, gidetail.lc_action with "M"
> do Form gisclient
>
>Endif
>
>my delete buton code is:
>replace gidetail.lc_date with date(), gidetail.lc_time with time(), ;
>gidetail.lc_user with User, gidetail.lc_action with "D", gidetail.upld_stat with 1
>DELE
> IF not Deleted()
> =Messagebox("Delete Unsuccessful !", 48)
> Endif
>this.parent.grid2.refresh()
>select gidetail
>
>
>My problem is that when I highlight a client in my grid and hit edit
>i want FormB to display this record but it always goes to the first record in the table. If I add code currec = recno() go currec
>I get the same result. How can I make FormB display the correct
>record?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform