prosedur dengan control
Dim pro As Control
For Each pro In Me
If TypeName(pro) = “TextBox” Then
pro = “”
End If
Next

pencarian menggunakan inputbox VB6
vcar = (InputBox(“pesan”, “info”))
Adodc1.Recordset.Find “field='” & vcar & “‘”, , adSearchForward, 1
If Adodc1.Recordset.EOF Then
MsgBox “data tidak di temukan”
Adodc1.Refresh
Else
a = MsgBox(“pesan”, vbYesNo, “info”)
If a = vbYes Then
Adodc1.Recordset.Delete
End If
End If

pencarian pada textbox muncul otomatis
Adodc1.RecordSource = “select * from pesan where nama like ‘%” & Text4 & “%’ ”
Adodc1.Refresh
tampil
aktif

pencarian menggunakan combutton yg di input dari textbox VB6
Adodc1.RecordSource = “select*from pesan where nama='” & Text4 & “‘ ”
Adodc1.Refresh
With Adodc1.Recordset
If .BOF And .EOF Then
MsgBox “data tidak ada”
Text4 = “”
Text4.SetFocus
Else
tampil
Text4 = “”
Text4.SetFocus
End If
End With

menampilkan kode otomatis berdasarkan tahun VB6
if adodc1.recordset.BOF and adodc1.recordset. EOF then
text1.text=format (date,”yyyy”) & “001”
else
adodc1.recordset.movelast
text1.text=format(date,”yyyy”)&right(str(val(right(adodc1.recordset!field,3))+1001),3)
end if

prosedur tampil pada vb6.0
text1.text=adodc1.recordset.fields(“field”)

mengatur tabel grid VB6
Gridkaryawan.Cols = 6
Gridkaryawan.Rows = 10
Gridkaryawan.ColWidth(0) = 100
Gridkaryawan.ColWidth(1) = 900
Gridkaryawan.ColWidth(2) = 2000
Gridkaryawan.ColWidth(3) = 1500
Gridkaryawan.ColWidth(4) = 1500
Gridkaryawan.ColWidth(5) = 1500

menyimpan VB6
With Adodc1.Recordset
If isi = True Then
.AddNew
.Fields(“field”) = Text1.Text
.Fields(“field”) = DTPicker1
.Update
Else
.Fields(“field”) = Text1.Text
.Fields(“field”) = DTPicker1
.Update
End If
End With

perhitungan
text3=(val(text1)*02)+val(text2)

fungsi enter
if keyascii=13 then
pernyataan
end if