Private Sub Command2_Click()
If Trim(gStatus) = "ADD" Then
Data1.Database.Execute "Insert into BIODATAS (Reg_No,Name_Of_Husband,Age,Parents,Born_in,Now_Residing_In,Name_Of_Wife,Age_Of_Wife,Parents_Of_Wife,BPlace,Now_Leaving_in,Solemnized,Date,Witness,DateIssued,Vicar) values ('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & text5.Text & "','" & Text6.Text & "','" & Text8.Text & "','" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & "','" & Text12.Text & "','" & Text13.Text & "','" & Text15.Text & "','" & Text16.Text & "','" & Text17.Text & "','" & Text7.Text & "')"
Data1.Refresh
Data1.Recordset.MoveLast
'--------------
Command3.Enabled = True
Command2.Enabled = False
Command1.Enabled = True
ElseIf Trim(gStatus) = "EDIT" Then
Data1.Database.Execute "Update BIODATAS set Reg_No='" & Text1.Text & "',Name_Of_Husband='" & Text2.Text & "',Age='" & Text3.Text & "',Parents='" & Text4.Text & "',Born_in='" & text5.Text & "',Now_Residing_In='" & Text6.Text & "',Name_Of_Wife='" & Text7.Text & "',Age_Of_Wife='" & Text8.Text & "',Parents_Of_Wife='" & Text9.Text & "',BPlace='" & Text10.Text & "',Now_Leaving_in='" & Text11.Text & "',Solemnized='" & Text12.Text & "',Date='" & Text13.Text & "',Witness='" & Text15.Text & "' ,DateIssued='" & Text16.Text & "',Vicar='" & Text17.Text & "'where Reg_No='" & Text0.Text & "'"
Data1.Refresh