It would be better if you defined in common language what it is that you hope to achieve. When I open the DB and look at the comments box, either in the form header or the form detail section, there is nothing in the _Click routine.
I suspect that you don't really mean "grouping" but rather you mean "filtering to select" - but then I don't like guessing intent and my fortune-telling ball just says "Situation hazy - try again later."
I usually use this method
1- character-by-character search for any field
2- sometimes a list box
3- for dates - two fields (the beginning and the end of the period), and it is not necessary to fill in both fields
4- for sums - similarly
as a rule, I prescribe the formation of a temporary filter in the VBA code, although it can also be done with a macro
Thank you Arnelgp for YOUR database which WORKS.
But when I import your form = ResearchAnalyst_F and the query = Analyst_Analysed_Q, into our live database, no records are found..
Can you please let me know what I have done wrong as I would like to use your system to show only the records that contain the word we are looking for in our other forms?
It would be better if you defined in common language what it is that you hope to achieve. When I open the DB and look at the comments box, either in the form header or the form detail section, there is nothing in the _Click routine.
I suspect that you don't really mean "grouping" but rather you mean "filtering to select" - but then I don't like guessing intent and my fortune-telling ball just says "Situation hazy - try again later."
Hello, The Doc Man, thank you for your note.
I am sorry for my language, but I am a volunteer at an NGO with very little programming experience.
We would like to apply a filter to view select records in our Access database.
Example; show only the records that contain;
Pepsi in the Analyst Comments field or
Boeing in the Analysed field
The typical way to do this is (a) have the form's recordsource cover all of the table's contents without a filter and then (b) using the form's filter options, implement by setting Me.Filter = {a criterion clause} and then Me.FilterOn = TRUE and then Me.Query.
A "criterion clause" is merely a WHERE clause without the word "WHERE" in it. So for a single-filter case
Obviously, you might have to actually build a string based how you want to implement your search, but once the string is build for all of the criteria, you just filter, enable filtrations, and requery. Note that there is also a dynamic ORDERBY with ordering criteria built the same way... it is just a simple ORDER BY clause without the words "ORDER BY" and there is an ORDERBYON property to turn on THAT option as well.
You can look here and browse in the properties to find the form's Filter and Order By options. If setting both a filter and an order, define them both and THEN do a single .Requery to get it all at once.
Thank you Arnelgp for helping us with the grouping of the search records.
We would like to be able to clear the grouped records so that we can do another search.
Could you please offer a suggestion as to how to clear the search word and the searched grouping?