Sub VlookupCOA()
Call Koneksi
SqlQueryString = "SELECT Nama_SL FROM SL WHERE No_SL = " & frm_JU.txt_COA.Text
Set rs = New ADODB.Recordset
rs.Open SqlQueryString, cnAccess, adOpenForwardOnly, adLockOptimistic
If Not rs.BOF Then
frm_JU.txt_NamaCOA.Text = rs("Nama_SL")
Else
MsgBox "COA tidak terdaftar", vbCritical, "Info"
frm_JU.txt_NamaCOA.Text = ""
frm_JU.txt_COA.Text = ""
End If
rs.Close
Set rs = Nothing
End Sub
0 komentar:
Posting Komentar