General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Display record value
I have a table seat_engg.dbf having field with 1. college 2. GE 3.MBC 4.OBC 5. KA
6. FF(All the filed type Integer data type. the sample table as shows below
COLLEGE GE MBC OBC KA FF
PEC_ECE 15 10 10 7 7
PEC_CSE 20 15 5 7 7
PEC_EEE 25 15 10 7 7
PEC_IT 18 10 10 7 7
I have form Namely "Display.Scx" on the form i have placed 20 text boxes(each row five text Boxes. the name of the text boxes as follows
1st row - txtpececege,txtpececembc,txtpececeobc,txtpececeka,txtpececeff
2nd row - txtpeccsege,txtpecseembc,txtpeccseobc,txtpecseeka,txtpeccseff
3rd row - txtpeceeege,txtpeceeembc,txtpeceeeobc,txtpeceeeka,txtpeceeeff
4th row - txtpecitge,txtpecitmbc,txtpecitobc,txtpecitka,txtpecitff
when i run the form i want show all the field value in the corresponding text boxes. I had written the code in Init event of the form as follows
GOTO TOP
LOCATE FOR seat_engg.college = "PEC_ECE"
IF FOUND()
thisform.txtpececege.controlsource = "seat_engg.ge"
thisform.txtpececembc.controlsource = "seat_engg.mbc"
thisform.txtpececeobc.controlsource = "seat_engg.obc"
thisform.txtpececeka.controlsource = "seat_engg.ka"
thisform.txtpececeff.controlsource = "seat_engg.ff"
ENDIF
LOCATE FOR seat_engg.college = "PEC_CSE"
IF FOUND()
thisform.txtpeccsege.controlsource = "seat_engg.ge"
thisform.txtpeccsembc.controlsource = "seat_engg.mbc"
thisform.txtpeccseobc.controlsource = "seat_engg.obc"
thisform.txtpeccseka.controlsource = "seat_engg.ka"
thisform.txtpeccseff.controlsource = "seat_engg.ff"
ENDIF
LOCATE FOR seat_engg.college = "PEC_EEE"
IF FOUND()
thisform.txtpeceeege.controlsource = "seat_engg.ge"
thisform.txtpeceeembc.controlsource = "seat_engg.mbc"
thisform.txtpeceeeobc.controlsource = "seat_engg.obc"
thisform.txtpeceeeka.controlsource = "seat_engg.ka"
thisform.txtpeceeeff.controlsource = "seat_engg.ff"
ENDIF
LOCATE FOR seat_engg.college = "PEC_IT"
IF FOUND()
thisform.txtpecitge.controlsource = "seat_engg.ge"
thisform.txtpecitmbc.controlsource = "seat_engg.mbc"
thisform.txtpecitobc.controlsource = "seat_engg.obc"
thisform.txtpecitka.controlsource = "seat_engg.ka"
thisform.txtpecitff.controlsource = "seat_engg.ff"
ENDIF
thisform.Refresh()
but it will show first record value in first five text boxes only. I want show all the four record value in the corresponding text boxes. how to correct my code? awaiting yours valuable reply
Next
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