Search Through a Data Base

  • Thread starter Thread starter amach
  • Start date Start date
A

amach

I am trying to search through many different fields of information
through one inputbox of information on a form. I know there is a way
to do it through VB but im not too familiar with it, and not sure how
to integrate it into the form. As a result i am trying to steering
clear of manually programming the VB code. So far i figured out how to
querie and set up filters, but havent figured out how to change the
criteria to where you can change it through a simple inputbox for every
time you are trying to use it. If anybody has any advice it would be
much appreciated.

Adam
 
I am trying to search through many different fields of information
through one inputbox of information on a form. I know there is a way
to do it through VB but im not too familiar with it, and not sure how
to integrate it into the form. As a result i am trying to steering
clear of manually programming the VB code. So far i figured out how to
querie and set up filters, but havent figured out how to change the
criteria to where you can change it through a simple inputbox for every
time you are trying to use it. If anybody has any advice it would be
much appreciated.

Adam

The need to use a single criterion across "many" fields very strongly
suggests a problem with your table design. Typically one would not
search an Address field for lastnames, or vice versa - each field
should contain one distinctive type of information, and you wouldn't
need to search many fields!

You can construct a SQL string in code, but I'm having difficulty
visualizing your table structure or just what you're trying to
accomplish. Could you describe your table structure? Is there some
reason you can't use a simple Parameter query with a criterion like

=[Forms]![NameOfYourForm]![NameOfSomeControl]

on one or more fields?

John W. Vinson[MVP]
 
Back
Top