by Victor Francisco Cajarito (Philippines) (2 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 6th April 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Search all records with have the same category to other tables.
Dim search as variant
sstr = InputBox("Enter Author to Search") ' Display a Input Box Window
data1.recordset.findfirst "Author='" & sstr & "'" ' Look for the record that has a value "sstr"
If trim(sstr) <> "" then
If data1.recordset.nomatch then 'check if the record exist
MsgBox "No record Exist"
Command1.setfocus
else
data1.recordsource = "SELECT * FROM TableName WHERE Author='" & sstr & "'" ' Display all the Records that has a Value of "sstr"
data1.refresh ' refresh the DBGRID or MSFLEXGRID
End if
End if
End Sub
No comments have been posted about Search all records with have the same category to other tables.. Why not be the first to post a comment about Search all records with have the same category to other tables..