Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL problem...

Status
Not open for further replies.

thetambarineman

Technical User
Feb 29, 2000
63
0
0
GB
Hello all

Previously ive had a search that isnt a string comparison.
As an enhancement id like it to be.

My code(which as usual- is pretty messy)

frmemployer.dbemployer.Recordset.MoveFirst

frmemployer.dbemployer.Recordset.FindFirst "employer_name='" & txtsearchemp & "'"
If frmemployer.dbemployer.Recordset.NoMatch = True Then
With assistant
.Show
.Speak ("No records found- please refine your search")
.Hide
End With

txtsearchemp.SetFocus
Else
frmemployer.dbemployer.RecordSource = "select * from dbemployer where employer_name like'" & "*" & txtsearchemp & "'*"
Listemp.AddItem frmemployer.dbemployer.Recordset("employer_name")


End If

Thanks in advance..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top