View: 2219|Reply: 6
|
Display data from two textbox to one textbox
[Copy link]
|
ieeya This user has been deleted
|
Hai guys.....I need your help......
1. How to display data from 2 textbox to one textbox in vb 6.0. I really need your help.
2. How display that data yang di search tu secara berturutan?Dalam textbox terbabit(saya nak display data terbabit spt cth di bwh)
cth: Data 1 : ID:123 Student : Siva
Data 2 : ID:456 Student: Yana
Data 3: ID:789 Student: Mohd |
|
|
|
|
|
|
ieeya This user has been deleted
|
Reply #1 ieeya's post
Katakan terdapat 1 database yg menyimpan data tersebut dima ID merupakan primary key |
|
|
|
|
|
|
ieeya This user has been deleted
|
Reply #2 ieeya's post
I'will appreaciate any advised and comment |
|
|
|
|
|
|
|
txtbox1.text = txtbox2.text + txtbox3.text
ni bukan dalam vb6... tak ingat syntax vb6... |
|
|
|
|
|
|
|
camane laa textbox nak display list data cik kak.. ker aku yang tak paham soklan nih.. kalau nk display list kene laa pkai datasheet ker.. listbox ker..
kalau nak display dari one table, gune jer query find list dalam list box.. tak pon data sheet. |
|
|
|
|
|
|
|
soalan pertama macam yg padlie tunjukkan,
soalan kedua
buat satu temp. variable dan sambungkan semua data yg telah dicari,
dengan buat looping untuk sume rekod yg telah dicari dalam database
rekod.movefirst
do while not rekod.eof
tmpString = "ID:" & rekod.column("ID") & " Student: " & rekod.column("Nama")
if rekod <> rekod terakhir then
tmpstring = tmpstring & vbcrlf
end if
rekod.movenext
loop
textbox1 = tmpstring |
|
|
|
|
|
|
|
textbox1=textbox2 & " - " & textbox3
so your data will display :
ID:123 Student : Siva - Data 2 : ID:456 Student: Yana |
|
|
|
|
|
|
| |
|