To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Co
To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Component
Rate To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Co
(1(1 Vote))
'Connect all the TextBoxes as Needed, The Place a Textbox on the form to
'Search the Records, Place A Command Button to Click to Search, Name the Search
'Textbox as TxtSearch and Search Command Button as CmbSearch then write the
'following Codes
' Assuming the Database name is Records, the Table Name is Recs and The Search
'Column is Id_Number.
Private Sum Form1_Load()
CmdSeach.Enabled=False
End Sub
Private Sub CmdSearch_Click()
Adodc1.RecordSet.Find "Select * From Recs Where Id_Num='" & TxtSearch.Text * "'",0,AdSearchForward,AdBookMarkFirst
If Adodc1.Recordset.EOF=True Then
MsgBox("Record Not Found in The Database, try Again")
TxtSearch.Text=""
TxtSearch.SetFocus
End If
End Sub
Private Sub TxtSearch_GotFocus()
If TxtSearch.Text=Empty Then
CmdSearch.Enabled=False
Else
CmdSearch.Enabled=True
End if
End Sub
' Make Sure You Connect The Adodc1 Very Well Before you Write The Code so that
'It Will Function Well
'*********** WhiteSoftx (Ola White) [email protected] for More Details*****
To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Co Comments
No comments yet — be the first to post one!
Post a Comment