Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add/change/delete grid/form
Message
De
04/10/1999 13:45:46
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Add/change/delete grid/form
Divers
Thread ID:
00272397
Message ID:
00272397
Vues:
52
Hello

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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform