Create a global search box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello again everyone,
I am trying to build a global search dialog box for my application. the idea
is clear in my mind but I lack the knowledge of the VB tools that enables me
from manipulating the fileds of my tables and queries.
So, my question is, how can i collect the fields names of a table or query
and add them as the source of a combo box?
Waiting for any reply
Cheers
 
hi Omar,
I am trying to build a global search dialog box for my application. the idea
is clear in my mind but I lack the knowledge of the VB tools that enables me
from manipulating the fileds of my tables and queries.
So, my question is, how can i collect the fields names of a table or query
and add them as the source of a combo box?
Use the following as a starting point:

Dim db As DAO.Database
Dim td As DAO.TableDef
Dim fd As DAO.Field

Set db = CurrentDb

For Each td In db.TableDefs
Debug.Print td.Name; ": ";
For Each fd In td.Fields
Debug.Print fd.Name; ";";
Next fd
Debug.Print
Next td

For your queries loop thru db.QueryDefs.


mfG
--> stefan <--
 
Back
Top