Hello,
I have a simple database to record jobs we are carrying out. My employer has asked me to add a text filter to enable a quick search through the jobs listed on a given form.
Normally, when going to a form, would add a criterion to the underlying query in order to filter the data. However, I don't seem to be able to filter using a text string in the form that is referencing the query.
I've successfully filtered data using this sort of code:
DoCmd.SetFilter wherecondition:="[JobTypeID] = 6"
This works for me where I'm using a discrete value like the number 6, above. However, I don't understand how to specify the filter if I want to search for text.
Can anyone help?
Best wishes,
Pete
I have a simple database to record jobs we are carrying out. My employer has asked me to add a text filter to enable a quick search through the jobs listed on a given form.
Normally, when going to a form, would add a criterion to the underlying query in order to filter the data. However, I don't seem to be able to filter using a text string in the form that is referencing the query.
I've successfully filtered data using this sort of code:
DoCmd.SetFilter wherecondition:="[JobTypeID] = 6"
This works for me where I'm using a discrete value like the number 6, above. However, I don't understand how to specify the filter if I want to search for text.
Can anyone help?
Best wishes,
Pete