by Yusuph Ola White(Prince of LCCC)Lagos City Computer College, Nigeria (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 28th November 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Component
'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*****
No comments have been posted about To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Co. Why not be the first to post a comment about To Search for Recordss)in Database Using Advanced Database Object(ADODC)ActiveX Data Object Data Co.