Find records

  • Thread starter Thread starter Pietro
  • Start date Start date
P

Pietro

Hi,
I've a continous fom called 'isues2',in the header of this form I've an
unbound control called 'Value'.in the details part I've one textbox called
'issue'

I want to write a word in 'value' to display in the details part of the
form all the records that contain the word I've written in 'value',i need to
display all the records that contain this word whether at the end or at the
beginning or in the midst of the record.
 
Pietro,

First of all, off on a tangent from your question, I would recommend
changing the name of your unbound control, as 'value' is a Reserved Word
(i.e. has a special meaning) in Access. Let's call it SearchValue instead.

You can use code, on the After Update event of the SearchValue textbox,
to modify the Record Source property of the form. Something like this:
Me.RecordSource = "SELECT * FROM YourExistingTable/Query WHERE Issue
Like "'*" & Me.SearchValue & "*'"

Or you could use code, again on the After Update event, to filter the
form's records, something like this:
Me.Filter = "Issue Like "'*" & Me.SearchValue & "*'"
Me.FilterOn = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top