I have a field in the database called "Tender Name" from this field I'm trying to get the first word "entered by the user in a text field" based on this entered word the search criteria will get the right tender name and display it in a report ... below I'm using crystal reports to display the searched criteria method into a report.
Example:
Tender Name = 'Maintenance School project"
Search Word = "Maintenance"
Output:
Must display all records that start with Maintenance.
//////////////////////////////////
Private Sub GoldButton1_Click()
'Dim Msg As String
Dim St As String
'Msg = InputBox("Enter the Section name", "Search by Section")
If txtProj.Text = "" Then Exit Sub
frmContProjects.Hide
With frmContProjects.Cr
.Connect = "DSN=TenderDb;UID=admin;PWD=sharmila"
.ReportFileName = App.Path & "\reports\Followup.rpt"
.SelectionFormula = "{proj_follow.tender_name} = '" & txtProj.Text & "%'"
.WindowState = crptMaximized
.Action = 1
.SelectionFormula = ""
End With
End Sub
Example:
Tender Name = 'Maintenance School project"
Search Word = "Maintenance"
Output:
Must display all records that start with Maintenance.
//////////////////////////////////
Private Sub GoldButton1_Click()
'Dim Msg As String
Dim St As String
'Msg = InputBox("Enter the Section name", "Search by Section")
If txtProj.Text = "" Then Exit Sub
frmContProjects.Hide
With frmContProjects.Cr
.Connect = "DSN=TenderDb;UID=admin;PWD=sharmila"
.ReportFileName = App.Path & "\reports\Followup.rpt"
.SelectionFormula = "{proj_follow.tender_name} = '" & txtProj.Text & "%'"
.WindowState = crptMaximized
.Action = 1
.SelectionFormula = ""
End With
End Sub