Use of Input $

B

Brendan Reynolds

The Input or Input$ (there's no space) function has nothing to do with input
masks. I know you get input mask topics returned if you search on the
function name in Access help. Unfortunately, help searches often return
completely unrelated topics like that. For the real deal on the Input or
Input$ function, search on the keyword 'input' (without the '$') from within
the VBA editor instead of the main Access window. The difference between
'Input' and 'Input$' is that 'Input' returns a Variant of sub-type String,
while 'Input$' returns a String.
 
J

JS

Hi Brendan,
Thanks for your response. How do I get to the VBA editor inside
Access?
So will Input$ allow me to do the following:
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!
 
B

Brendan Reynolds

There are numerous ways to get to the VBA editor from the Access window. One
way is to choose 'Module' from the 'Insert' menu.

No, I don't think the Input/Input$ function is relevant to the task your
describe.

I'm sorry, I don't have an answer to your question - displaying a list of
field names from one table is easy, but displaying a list of fields names
'from any table in the database' is not the kind of thing that is normally
done in a relational database.
 
J

JS

Thank you so much for your response. How can I display the list of
columns/fields from 1 table? I searched a lot - but didn't find a
solution.

Thanks.
 
B

Brendan Reynolds

Place a combo box (or a list box if you prefer) on a form. If the combo box
wizard starts, cancel it. If the Properties window is not already visible,
make it visible by selecting Properties from the View menu. Select the Data
tab in the Properties window, and in the Row Source Type field select Field
List. Now in the Row Source field you can select the name of the table or
query containing the fields you want to list.
 
Top