Topic: msflexgrid data
sy punya code.. :
If KeyAscii = 13 Then
Call Konek
With DataEnvironment1.rsMasterPembelianDetailPart
If txtnobeli.Text = ҠThen
txtnobeli.SetFocus
Else
If .State = 0 Then .Open
If .RecordCount > 0 Then
.MoveFirst
.Filter = adFilterNone
.Filter = “Supplier=’†& UCase(txtkdsupp.Text) & “‘and Tahun=’†& UCase(txttglbeli.Text) & “‘ and Faktur=’†& UCase(txtnobeli.Text) & “‘â€
If Not .EOF Then
Frame2.Visible = False
.Requery
MSFlexGrid1.Refresh
Frame1.Visible = True
R = .RecordCount
For i = 1 To R
MSFlexGrid1.Rows = i
MSFlexGrid1.AddItem !KodePart & vbTab & !NamaPart & vbTab & !QtyPembelian & vbTab & !QtyIntransit & vbTab & !QtyPenerimaan
Next i
Frame3.Visible = True
txtsupplier.Text = txtkdsupp.Text
txtinvoice.Text = txtnobeli.Text
txttglinvoice.Text = !TanggalInvoice
txttglinvoice.Text = Format(txttglinvoice.Text, “dd/mm/yyyy†)
Else
MsgBox “Nomor Yang Anda Masukan Tidak Ada Di MasterPembelianPart†, vbCritical, “Peringatanâ€
txtnobeli.Text = “â€
.Filter = adFilterNone
End If
End If
End If
End With
End If
sy mw menampilkn record yg ad di database ke msflexgrid yg record’y lebih dari stu record..
tp knapa record yang pertama saja yg di ulang sebanya recordcount…??
apa ada yg salah di code sya di atas..??
mohon bantuannya..
