Create Drop Down List that displays only field names from a table

J

JS

Hi all,
I am a new user of Access. I am using Access 2002. I need to Create a
"Drop Down List" that displays only field names from a table.

This is what I need to do to give you context

I need for the user to be able to select 2 field names (that belong to
any of my 5 database tables)from two different drop down lists and
then have Access automatically run a crosstab/pivot table query of the
two fields and display them in a report. So for example if the user
selected Ethnicity and Age - I would like Access to create a report
with the percentage of people in each Ethnicity and Age grouping.


So I guess creating a "Drop Down List" that displays only field names
from a table - is the first step. Unless there is another better way
to do this.


I really appreciate your help!
 
A

Anne Troy

Hi, JS. I'm no Access guru, by far, but I do know that what you're asking
for is a pretty tall order without a sample of your database with which to
work. You might start by looking for "Query by Form". This should help you
get the data you need, at least.
*******************
~Anne Troy

www.OfficeArticles.com
 
G

Graham Mandeno

Hi JS

In the combo box properties sheet, set RowSource to the name of the table,
and RowSourceType to "Field List".
 
J

JS

Thank you Anne for your response.
I have been doing Query by Example/Select and Cross Tab Queries. Here
is a miniature version of the table I am working with. Please let me
know if I can give any more info.
Response_ID Quintile SubQuintile Express_Spend Age Ethnicity
2 1 1A 100 32 American
3 3 3A 100 24 Indian
4 1 1A 1000 25 Black
5 2 2A 400 26 Hispanic
6 3 3A 500 34 White
7 1 1B 600 23 White
 
A

Avlan

A little bit complicated, but I guess there's more then one solution.

One not-so-gracious solution is to make a table with all the field
names, make dropdown boxes from which the user chooses, then read out
which one he choose and based on that create a report based on the
chosen ones. :p
Problem with this is when you add or remove a column in a table; Since
the table with the fieldnames is not linked in any way your DB might
get 'poluted'.

So the best thing to do is make dropdown lists that you actually read
out from the tables... I'm not sure how to do this but it must be
possible.

So you should make a report, which needs a minimum of 2 colums entered
to generate a report (you could make this and test it) and you need a
form from which you can choose and read out the colums (you can make
this and test it too) and then combine them...
 

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