thank you for this brosimple pro ko ya sa 1st year,, gawin molng guide para sa mga design mo,,
how about yung merun ng seacrh button bro ?np,,
ask klng,,, baka makatulong ako,,
Private Sub Command1_Click()how about yung merun ng seacrh button bro ?
Private Sub Command1_Click()
Adodc2.RecordSource = " select * from Tablenae where Fieldaname = " & Text1.Text & ""
If Adodc2.Recordset.EOF = True Then
MsgBox "Record not found"
Else
DataGrid1.datasource = Adodc2.recordsource
DataGrid1.Refresh
End If
End Sub
sa datagrid yan tol,, alam mo namn cguro pano mag connect
ayaw tol eh .. debugPrivate Sub cmdCancel_Click()
txtSerialNo.Text = ""
txtName.Text = ""
txtSurname.Text = ""
txtSex.Text = ""
txtAddress.Text = ""
txtCity.Text = ""
txtZipCode.Text = ""
txtContactNo.Text = ""
txtOccupation.Text = ""
txtFamilyMembers.Text = ""
txtAppliedOn.Text = ""
txtNoCylinder.Text = ""
txtTypeConnection.Text = ""
End Sub
Private Sub cmdSearch_Click()
txtSerialNo.Enabled = True
txtName.Enabled = True
txtSurname.Enabled = True
txtSex.Enabled = True
txtAddress.Enabled = True
txtCity.Enabled = True
txtZipCode.Enabled = True
txtContactNo.Enabled = True
txtOccupation.Enabled = True
txtFamilyMembers.Enabled = True
txtAppliedOn.Enabled = True
txtNoCylinder.Enabled = True
txtTypeConnection.Enabled = True
If txtSerialNo.Text = "" Then
MsgBox " Please enter Serial No to search "
Exit Sub
Else
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\GASAGENCYdb.mdb"
.RecordSource = "Select * from CustomerDetails Where SerialNo = " & txtSerialNo.Text
.Refresh
End With
If Adodc1.Recordset.BOF = True Or Adodc1.Recordset.EOF = True Then
MsgBox " No Record Found "
txtSerialNo.Text = ""
Exit Sub
Else
txtName.Text = Adodc1.Recordset.Fields(1)
txtSurname.Text = Adodc1.Recordset.Fields(2)
txtSex.Text = Adodc1.Recordset.Fields(3)
txtAddress.Text = Adodc1.Recordset.Fields(4)
txtCity.Text = Adodc1.Recordset.Fields(5)
txtZipCode.Text = Adodc1.Recordset.Fields(6)
txtContactNo.Text = Adodc1.Recordset.Fields(7)
txtOccupation.Text = Adodc1.Recordset.Fields(8)
txtFamilyMembers.Text = Adodc1.Recordset.Fields(9)
txtAppliedOn.Text = Adodc1.Recordset.Fields(10)
txtNoCylinder.Text = Adodc1.Recordset.Fields(11)
txtTypeConnection.Text = Adodc1.Recordset.Fields(12)
End If
End If
End Sub
ok na..