Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using GRID to enter data
Message
From
09/04/2008 12:51:28
Fabian Borghi
Xenon Information Technology
Itaparica, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01309223
Message ID:
01309428
Views:
7
IF !EMPTY(THISFORM.combo1.VALUE)
	PUBLIC x_consmat
	x_consbim = ALLTRIM(STR(THISFORM.optiongroup1.VALUE))
	x_consmat = ALLTRIM(THISFORM.combo1.VALUE)


	IF THISFORM.combo1.VALUE="99"
	ELSE
*SET STEP ON

		IF THISFORM.optiongroup1.VALUE = 1 OR THISFORM.optiongroup1.VALUE = 2 OR THISFORM.optiongroup1.VALUE = 3 OR THISFORM.optiongroup1.VALUE = 4


			x_strsql = "select dados.matricula,dados.nome, " + "notas.t" + x_consmat + " as teste ," + ;
				"notas.p" + x_consmat + " as prova ," + ;
				"notas.q" + x_consmat + " as qualit ," + ;
				"notas.o" + x_consmat + " as outros from dados,notas into dbf tempnota where notas.serie = " + THISFORM.combo2.VALUE + " .and." + ;
				" notas.bimestre = " + x_consbim + " .and. notas.matricula = dados.matricula"
			&x_strsql
		
			ALTER TABLE tempnota ADD COLUMN Total n(5,2)
			
			thisform.grid1.RecordSourceType=0
			thisform.grid1.RecordSource = "tempnota"

						
			thisform.grid1.ColumnCount = 7
			thisform.grid1.column1.Width= 0
			thisform.grid1.column2.Width= 300
			thisform.grid1.column3.Width= 50
			thisform.grid1.column4.Width= 50
			thisform.grid1.column5.Width= 50
			thisform.grid1.column6.Width= 50
			thisform.grid1.column7.Width= 50

			thisform.grid1.column2.header1.Caption="Nome"
			thisform.grid1.column3.header1.Caption="Teste"
			thisform.grid1.column4.header1.Caption="Prova"
			thisform.grid1.column5.header1.Caption="Qualit."
			thisform.grid1.column6.header1.Caption="Outras"
			thisform.grid1.column7.header1.Caption=""
			
			thisform.grid1.column3.ControlSource = "Tempnota.teste"
			thisform.grid1.column4.ControlSource = "Tempnota.prova"
			thisform.grid1.column5.ControlSource = "Tempnota.qualit"
			thisform.grid1.column6.ControlSource = "Tempnota.outros"
			thisform.grid1.column7.ControlSource = "Tempnota.teste+Tempnota.prova+Tempnota.qualit+Tempnota.outros"
					
		ELSE

		ENDIF
	ENDIF
ENDIF

thisform.combo1.Enabled= .F.
thisform.command2.Enabled= .T.
thisform.grid1.Visible= .T.
Fabian A. Borghi
Xenon Information Technology
Itaparica - BA - Brasil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform