Query variable to look up a table field name

S

St_man

I need to set up a form with a list box that reads from a table. then after
highlighting my choice, run a query that takes the highlited item that is a
table field name, and uses it to search in a different table for all the
records that meet a "true" criteria under that fiels name.
There may already be a question like this on thid forum. If so, please
point it out to me or give me some direction.

Thanks
Stan
 
P

pietlinden

Wow does that sound like homework!!!

Are you *sure* you want a listbox? Or is your instructor putting you
up to this?

What's the point of this? Are you building a custom search form or
something? Doesn't sound much like a query problem. This is more a
form/control manipulation problem. You can build the SQL on the fly
and then assign it to some query's SQL property...

but what's this all about anyway? Why do you need it? Give us a real
example.

Did you actually search the NG? Try the forms NG too...
 
S

St_man

No, this is not homework. I do not care how I do it, with a strait up query,
some SQL manipulation, VBA, or VooDoo. I'm just trying to figure out how to
reference in a variable, the "headings" of a table. In this way I can query
just that column of the table. I want to use a list box on a form to change
which column I am querying at my whim.
I work at a plant that has 30 years of training records on paper. It is
time we start to track training electronically. The table in question is one
in which training names are the field names, except for one. That one is
various job titles at the facility.
The records are true/false noting whether or not the job requires a specific
training subject.
Is doing this extremely easy (and I'm not seeing it) or is it extremely
hard? Any help is appreciated.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top