Dear All,
Saya punya tabel user yang di dalamnya punya field "state1", "state2" dst, saya
mau abil field itu secara array cuma mentok, saya ambil potongan kodingnya :
Dim table1 as ADODB.Recordset
dim sql as String
Dim i As Integer
Dim vState As Variant
vState = Array("state1", "state2", "state3", "state4", "state5")
Set table1 = New ADODB.Recordset
sql = "select * from user where kode='" & frmUser.ListView.SelectedItem & "'"
table1.Open sql, MdbConnection, adOpenDynamic, adLockOptimistic
For i = 0 To 4
If table1!vState(i) = 1 Then
Check1(i).Value = vbChecked
Else
Check1(i).Value = vbUnchecked
End If
Next i
Please help me, thanks b4