D
DeVille
Hi I have this piece of code which uses an 'on-click'
event procedure on my form to filters my records. The
field is named 'Subject' and the code brings up a
dialogue box which I then type the first part of a
sentence and it finds all records which start with that
text. Eg if I type 'TH' it would bring back all records
that start with words like 'THE', 'THERE' or 'THAT' etc.
I would like to change the code so that it finds records
where the wild card is in the middle of the text. Eg if I
typed "OO' it would find 'BOOK' or 'SCHOOL' etc.
If any one can help me thanks in advance. see code
below
Let CurRecNo = Form.CurrentRecord
QryFld = " Subject "
Me.Filter = "[Subject] Like '" & InputBox("Enter
Subject") & "*'"
Me.FilterOn = True
event procedure on my form to filters my records. The
field is named 'Subject' and the code brings up a
dialogue box which I then type the first part of a
sentence and it finds all records which start with that
text. Eg if I type 'TH' it would bring back all records
that start with words like 'THE', 'THERE' or 'THAT' etc.
I would like to change the code so that it finds records
where the wild card is in the middle of the text. Eg if I
typed "OO' it would find 'BOOK' or 'SCHOOL' etc.
If any one can help me thanks in advance. see code
below
Let CurRecNo = Form.CurrentRecord
QryFld = " Subject "
Me.Filter = "[Subject] Like '" & InputBox("Enter
Subject") & "*'"
Me.FilterOn = True