to add customers record into database
to add customers record into database
Rate to add customers record into database
(1(1 Vote))
Dim db As Database, Table As Recordset, KiraRekod As Recordset, Total As Integer
Set db = Workspaces(0).OpenDatabase(App.Path & "\daftar.mdb")
Set Table = db.OpenRecordset("pendaftaran", dbOpenDynaset)
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Table.AddNew
End Sub
Private Sub cmdsubmit_Click()
simpanrekod
senaraicustomer
End Sub
Sub simpanrekod()
Dim db As Database, Table As Recordset, KiraTable As Recordset
Set db = Workspaces(0).OpenDatabase(App.Path & "\daftar.mdb")
Set Table = db.OpenRecordset("pendaftaran", dbOpenDynaset)
Set KiraTable = db.OpenRecordset("pendaftaran")
Table.AddNew
Table("Name") = Text1.Text
Table("User Login") = Text2.Text
Table("Password") = Text3.Text
Table("Email") = Text4.Text
Table.Update
End Sub
Private Sub Command1_Click()
Text1.Text = ""
End Sub
Private Sub Command2_Click()
Text2.Text = ""
End Sub
Private Sub Command3_Click()
Text3.Text = ""
End Sub
Private Sub Command4_Click()
Text4.Text = ""
End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
Private Sub Form_Load()
Dim db As Database, Table As Recordset, KiraRekod As Recordset, Total As Integer
Set db = Workspaces(0).OpenDatabase(App.Path & "\daftar.mdb")
Set Table = db.OpenRecordset("pendaftaran", dbOpenDynaset)
Set KiraRekod = db.OpenRecordset("pendaftaran")
senaraicustomer
End Sub
Sub senaraicustomer()
Dim db As Database, Table As Recordset, KiraRekod As Recordset, Total As Integer
Set db = Workspaces(0).OpenDatabase(App.Path & "\daftar.mdb")
Set Table = db.OpenRecordset("pendaftaran", dbOpenDynaset)
Set KiraRekod = db.OpenRecordset("pendaftaran")
If Table.RecordCount = 0 Then
Exit Sub
Else
End If
List1.Clear
Table.MoveFirst
While Not Table.EOF
List1.AddItem Table("Name")
Table.MoveNext
Wend
End Sub
to add customers record into database Comments
No comments yet — be the first to post one!
Post a Comment