Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add/change/delete grid/form
Message
From
04/10/1999 13:45:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Add/change/delete grid/form
Miscellaneous
Thread ID:
00272397
Message ID:
00272397
Views:
53
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?
Next
Reply
Map
View

Click here to load this message in the networking platform