Group all matching records to search word (1 Viewer)

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
Could we please receive assistance in grouping all records matching the Search Word that is typed into the Comments Box?

Our form = ResearchAnalyst_F = used in access 2003

Your suggestions will be appreciated

Crystal
 

Attachments

  • Find_Group_Records=22_218.mdb
    332 KB · Views: 89

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:32
Joined
Feb 28, 2001
Messages
27,175
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."
 

SHANEMAC51

Active member
Local time
Today, 23:32
Joined
Jan 28, 2022
Messages
310
Could we please receive assistance in grouping all records matching the Search Word that is typed into the Comments Box?

Our form = ResearchAnalyst_F = used in access 2003

Your suggestions will be appreciated

Crystal
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
 

Attachments

  • 2022-08-07_10-26-50.png
    2022-08-07_10-26-50.png
    29.9 KB · Views: 88

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:32
Joined
May 7, 2009
Messages
19,237
see the Recordsource of the Form (query Analyst_Analysed_Q) in design view.
you need to press the binocular button to apply the filter.
 

Attachments

  • Find_Group_Records=22_218.mdb
    524 KB · Views: 96

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
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?

Thank you,
Nicole
 

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
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

Thank you
Nicole
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:32
Joined
Feb 28, 2001
Messages
27,175
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

Code:
Me.Filter = "[Analyst Comments] = 'Pepsi'"
Me.FilterOn
Me.Requery

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.

 

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
see the Recordsource of the Form (query Analyst_Analysed_Q) in design view.
you need to press the binocular button to apply the filter.
Thank you for your assistance, but we can not get your grouping to work on this Form.

What we are trying to do is Find the Equity word and group all the matching words together.

We would appreciate your assistance.
Crystal and Nicole
 

Attachments

  • Find_Group_Records=22_225.mdb
    340 KB · Views: 78

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:32
Joined
May 7, 2009
Messages
19,237
check and test again.
 

Attachments

  • Find_Group_Records=22_225.mdb
    1.6 MB · Views: 89

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
Clear the filtered contents

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?

Thank you.
Nicole
 

Attachments

  • Find_Group-Records_Clear=22_226.mdb
    336 KB · Views: 78

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:32
Joined
May 7, 2009
Messages
19,237
here check and test the "clear" button.
 

Attachments

  • Find_Group-Records_Clear=22_226.mdb
    1 MB · Views: 73

access2010

Registered User.
Local time
Today, 13:32
Joined
Dec 26, 2009
Messages
1,021
Thank you, Arnelgp.
Your help with the Find, Clear Data and Refresh the page is appreciated.

Crystal & Nicole
 

Users who are viewing this thread

Top Bottom