hi.. thanks for the answer..
well, i put that code to my work but still can't solve my problem.
here are the codes i wrote in the add botoom..
tempnum = VAL(Thisform.txtORNO.Value) + 1
thisform.txtorno.Value = STR(tempnum)
thisform.txtdate.Value = {}
thisform.txtcode.Value = ""
thisform.txtname.Value = ""
thisform.txtcash.Value = 0
thisform.txtchkno.Value = ""
thisform.txtchkdate.Value = {}
thisform.txtchkamnt.value = 0
thisform.txtbank.Value = ""
thisform.txtremarks.Value = ""
thisform.txtamount.Value = 0
thisform.okedit = .t.
thisform.grid1.recordsource="" &&& i make this code so that the grid will empty during adding data.
Thisform.grid1.Refresh()
in my program i make a locate botton to put data to the grid. but the problem is that the data will not display to the grid. but when i browse the table the data is there.here are the codes
DO FORM locatepatient.scx
LOCAL lcoldselect
lcoldselect = SELECT()
thisform.txtcode.value = patienthdr.code
thisform.txtname.Value = patienthdr.name
SELECT * from Patientdtl WHERE Patientdtl.code == ALLTRIM(thisform.txtcode.Value) INTO CURSOR tpatient
SELECT tPatient
SCAN
SELECT Ordetail
APPEND BLANK
Replace ORNO WITH thisform.txtorno.Value
Replace resultname WITH tPatient.type
Replace amount WITH tPatient.price
Replace paid WITH tPatient.paid
ENDSCAN
Thisform.Refresh()
thisform.grid1.Refresh()
SELECT(lcoldselect)
the recordsource of the gird is the ordetail.
my friend told me if i put this code thisform.grid1.recordsource="" the grid was un bind.my problem is if i will not put this when i add new data the grid will not empty.
hope u can help me..
john
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only