My fault.
Change End If on Line 20 with End With
My fault.
Change End If on Line 20 with End With
Is this VB (4,5,6) or VBA (dont really know what is VBA ;)
I think there's no code as "Insert Into" in VB ( at line 10).
Looks like Php to me.
Try this:
Dim rs as New ADODB.Recordset
With rs
.Open "select * from Pemilik", Dbconn, adOpenDynamic, adLockOptimistic
.AddNew
.Fields(1) = txtNa.Text 'you can also put the name of the field in your table inside the ()
.Fields(2) = txtNokad.Text 'i prefer using numbers for easy coding
.Fields(3) = txtWarganegara.Text
.Fields(4) = Notel.Text
.Fields(1) = txtHarga.Text
.Fields(2) = txtTingkat.Text
.Update
MsgBox "Record successfully saved!!", vbInformation
.Close
End If
And concatenation in VB if you are going to put 2 or more textbox values in a single field in your Database:
.Fields(1) = .Fields(1) = txtNa.Text & " " & txtNokad.Text & " " & txtWarganegara.Text
Hope this helps.