Halo para vb master, tolongin donk,
dimana salahnya, script ini waktu di run muncul run-time error, tlg yah plz.
ini saya copy paste dari vb.
Private Sub CMDSAVE_Click()
If cmbcurrency.Text = "IDR" Then
Call IDR
Else
Call usd
End If
Adodc1.Refresh
DG1.Refresh
End Sub
Private Sub Form_Load()
strcon = "provider=microsoft.jet.oledb.4.0;data source=c:\trs\vendor.mdb"
Set cn = New ADODB.Connection
cn.ConnectionString = strcon
cn.Open
End Sub
Sub IDR()
Dim sqlidr As String
sqlidr = "insert into vendor
(NOID,VENDOR,NOINVOICE,PEKERJAAN,INVOICEDATE,RECDATE,DUEDATE,INVOICE,IDR,TOTAL)
values" & _
"('" & txtid.Text & "','" & txtvendor.Text & "','" & txtnoinvoice.Text &
"','" & txtpekerjaan.Text & "'," & _
"'" & txtinvoicedate.Text & "','" & txtrecdate.Text & "','" &
txtduedate.Text & "','" & Val(txtinvoice.Text) & "'," & _
"'" & cmbcurrency.Text & "','" & Val(txttotal.Text) & "')"
cn.Execute (sqlidr)
End Sub
Sub usd()
Dim sqlusd As String
sqlusd = "insert into vendor
(NOID,VENDOR,NOINVOICE,PEKERJAAN,INVOICEDATE,RECDATE,DUEDATE,INVOICE,USD,TOTAL)
values" & _
"('" & txtid.Text & "','" & txtvendor.Text & "','" & txtnoinvoice.Text &
"','" & txtpekerjaan.Text & "'," & _
"'" & txtinvoicedate.Text & "','" & txtrecdate.Text & "','" &
txtduedate.Text & "','" & Val(txtinvoice.Text) & "'," & _
"'" & cmbcurrency.Text & "','" & Val(txttotal.Text) & "')"
cn.Execute (sqlusd)
End Sub
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
[Non-text portions of this message have been removed]