Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid
Message
De
21/05/2009 01:15:40
Muthu Vel
Sty Company
Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Grid
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01401196
Message ID:
01401196
Vues:
94
I have create two forms namely 1. empmain.scx 2. search.scx, in empmain form I have entered new employee records only in that i have put one grid control, and five text boxes and three command button. when I run the form all the records displayed in grid. I have click search command button in empmain.scx the search form will open and i have find some records and again i have come back to empmain form the records not display in the grid control.

1. code of the empmain.scx is below

use "D:\centac\emp.dbf"
locate for (thisform.txtappno.value) = appno
if NOT found()
INSERT INTO centac values(thisform.txtappno.value, thisform.txtadd1.value, thisform.txtadd2.value, thisform.txtadd3.value, thisform.txtadd4.value,;
thisform.combo1.value, thisform.combo2.value, thisform.txtddno.value, thisform.txtbank.value, VAL(thisform.txtamount.value), thisform.txtdate.value)
thisform.grid1.refresh
ELSE
Messagebox("APPLNO ALREADY EXISTS")
endif
thisform.txtappno.value = ""
thisform.txtadd1.value = " "
thisform.txtadd2.value = " "
thisform.txtadd3.value = " "
thisform.txtadd4.value = " "
thisform.txtddno.value = " "
thisform.txtbank.value = " "
thisform.txtamount.value = " "
thisform.txtappno.setfocus

2. code of the seach is below

use "D:\centac\emp.dbf
if thisform.optiongroup1.option1.value = 1
locate for thisform.txtsearch.value = ddno
if found()
Messagebox("RECORD FOUND")
ELSE
Messagebox("RECORD NOT FOUND")
ENDIF
thisform.txtsearch.value = " "
thisform.txtsearch.setfocus
ELSE
if thisform.optiongroup1.option2.value =1
lctext = alltrim(upper(this.parent.txtsearch.value))
select * from centac where upper(address1) like lctext+'%'
endif
ENDIF
thisform.txtsearch.value = " "
thisform.txtsearch.setfocus
How to rectify the problem?
Awaiting yours reply.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform