hello everyone,
i need help,
can anyone help me to check out the coding??
Private Sub cmdBatal_Click()
paparan.Show
Me.Hide
Unload Me
End Sub
Private Sub cmdSimpan_Click(Index As Integer)
If InsuData = True Then
con.Execute "Insert into Pemilik(Na,Nokad,Warganegara,Notel,Harga,Tingkat) values ('" & txtNama.Text & "','" & txtNoKad.Text & "', '" & txtWarganegara.Text & "'," & txtNoTel & ",'" & txtTingkat.Text & "')"
MsgBox "Successfuly Save!!", vbInformation, "sistem pengurusan rumah sewa"
End If
End Sub
Function InsuData() As Boolean
Dim ss
For Each ss In Me
If TypeOf ss Is TextBox Or TypeOf ss Is ComboBox Then
If ss.Text = "" Then
answer = MsgBox("Insufficient Data!", vbInformation, "sistem pengurusan rumah sewa")
ss.SetFocus
Exit Function
End If
End If
Next
InsuData = True
End Function
my module coding :
Global con Asmy module coding : New ADODB.Connection
Sub main()
con.CursorLocation = adUseClient
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistempengurusanrumahsewa.mdb;Persist Security Info=False"
login.Show
End Sub