searching entire database

  • Thread starter Thread starter misschanda via AccessMonster.com
  • Start date Start date
M

misschanda via AccessMonster.com

Is there a way to Create a Search function that searches every table in the
entire database?
Thanks
LA
 
Create a table of numbers 0001 through ????. The easy way is to use Excel
autofill and copy/paste or import int to the table with text field (leading
zeros).
Left join the number table to your query Sort1. You might use a criteria
either a prompt for the top number or DLookup the max.
 
No easy way. You'd have to write some code to go through the table and column
collections.

The important point is that you should not need to IF the database tables
are properly set up (i.e. normalized). If you have something like seperate
tables for June, July, August, etc., data, that is the problem. All the same
data should be in one table.
 
Do you want to search every table and every field? It would be possible
with some complex VBA. Can you describe the what you are trying to
accomplish by doing this? It is almost certainly not a good idea. The need
to do this leads me to suspect that your database design is faulty.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
From your advise earlier:

search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls

on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

My objective was acheived. However, ran into problems when trying to search
phrases or joining two different words to search as in Blue and Polymer. I
was hoping to figure out a way to create a system that when search criteria
is entered into the text, the criteria can search phrases and etc.
 
From your advise earlier:

search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls

on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

My objective was acheived. However, ran into problems when trying to search
phrases or joining two different words to search as in Blue and Polymer. I
was hoping to figure out a way to create a system that when search criteria
is entered into the text, the criteria can search phrases and etc.
 
Use this ---
Like "*" & [Forms]![frmParameter]![txtParameter] & "*"

On your search form you can have two textboxes and a checkbox labeled And/Or.
In your search query add a field like this --
[Forms]![frmParameter]![And/OrCheckBox]
You then would use either a 0 (zero) or a -1 (minus one) to select whether
the two text boxes would both be required or either one.

--
KARL DEWEY
Build a little - Test a little


misschanda via AccessMonster.com said:
From your advise earlier:

search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls

on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

My objective was acheived. However, ran into problems when trying to search
phrases or joining two different words to search as in Blue and Polymer. I
was hoping to figure out a way to create a system that when search criteria
is entered into the text, the criteria can search phrases and etc.


Jerry said:
No easy way. You'd have to write some code to go through the table and column
collections.

The important point is that you should not need to IF the database tables
are properly set up (i.e. normalized). If you have something like seperate
tables for June, July, August, etc., data, that is the problem. All the same
data should be in one table.
 
Back
Top