How to search ALL fields in table and show them in subform?

daze

Registered User.
Local time
Today, 21:46
Joined
Aug 5, 2009
Messages
61
So,

I have form with fields of table for new entry and subform table that is showing all of records (Master - child fields links are empty) and that works fine.

Now I'd like to make search button that can search ALL the fields in table and show them in subform table.

Any ideas?
 
search all the fields how, and for what? do you mean to find any records that have any of the same data as the current record in any of their fields? or do you mean to find, say, a specific word, but in any field of the table?
 
Have a look at the Cool Search tool here
 
I suspect that Cool Search Tool as posted in John's link has been damaged by the attempts by the poster in trying to make it work with their code. Either that or it was only half baked originally.

It leaves the current record showing even after it has been lost from the listbox. Not technically broken but definitely poor or damaged design.
The VBA code for dealing with no matches is not working either.

(Access 2007)
 
I suspect that Cool Search Tool as posted in John's link has been damaged by the attempts by the poster in trying to make it work with their code. Either that or it was only half baked originally.

It leaves the current record showing even after it has been lost from the listbox. Not technically broken but definitely poor or damaged design.
The VBA code for dealing with no matches is not working either.

(Access 2007)
I've had no trouble with it in '03 (or on my '07 for that matter), admittedly I have bashed it considerably to meet my own needs, and may have eliminated any bad habits it exhibits in the posted link.
 
here is a DB i have been developing for work. as such it's not a "sample" database - so there's a lot going on inside it in addition to the search capabilities.

so when you open the file, if you go to the "review orders" button form the switch board, you will see a (what i like to call "sophisticated ") search form. it's powered by SQL behind the "search" button. have a look as see if it might be what you need. (right-click, design view, select the "search" button, then look at the "on click" event code)

i know it's a somewhat advanced example, but it shows you what you can do in access.

failing that, you can just base your subform on a query which has parameters that pull data from the controls on the main form. these would be in a format like:

Code:
Like * & [forms]![frmYourMainForm].[YourControl] & *
which would find the text in your control anywhere in the field where you have placed that code in query design.
 

Attachments

OK here's a copy of the Search tool that I know works.

ah, you beat me to it.

john's file has a working example of the parameter query based search that i was talking about at the end of my post.

so you have some options. :)

have fun, and let us know if you get stuck.
 

Users who are viewing this thread

Back
Top Bottom