Auto Fill

G

Guest

I am trying to program my database to to pull information from one of my
tables when I select a item from a form. Example...I have a form in which I
have a drop down list. My drop down list is pulling names from my table.
When I select a name from the list, I would like it to auto fill the rest of
the information on my form based of the information stored in my table. Is
this possible? If so, how? Thanks for your help.
 
A

Arvin Meyer [MVP]

What you need to do is to add the other information to the select statement
or query that is the rowsource of your combo box. Don't forget to change the
number of columns and add their columnwidths (even if it's zero) to the
property sheet.

As the control source of several text boxes, you simply use:

=[ComboBoxName].Column(3)

the column index starts at 0, so just count to the column you want in each
of the text boxes. This will display what you need in your form, but doesn't
store that data, since in a relational database you do not need to store it
twice.
 
G

Guest

Thank you...now once I get my form to bring up my data (auto fill) based on
what I select from my drop down list, how can I get my form to use that data
to calculate an expression? For example...I have a query in which I created
different expression to calculate different values based on data from my
table. What I want to happen is I want to select an item from my drop down
list, it in turn will auto fill my information based on my selection, and
then my expression I created in my query will used that auto fill data to run
its calculations. Basically I'm trying to create a payroll program in Access
and I want to select an employee name from my drop down list, I want it to
pull up that employee's W-4 information (deduction, exemptions, etc) and pay
rate (my auto fill) and use that information to calculate the withholding
taxes which I have already the expression to do so in my query which is what
my form is based on. I hope this is not too confusing.

Thanks

Arvin Meyer said:
What you need to do is to add the other information to the select statement
or query that is the rowsource of your combo box. Don't forget to change the
number of columns and add their columnwidths (even if it's zero) to the
property sheet.

As the control source of several text boxes, you simply use:

=[ComboBoxName].Column(3)

the column index starts at 0, so just count to the column you want in each
of the text boxes. This will display what you need in your form, but doesn't
store that data, since in a relational database you do not need to store it
twice.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

ReggieF said:
I am trying to program my database to to pull information from one of my
tables when I select a item from a form. Example...I have a form in which
I
have a drop down list. My drop down list is pulling names from my table.
When I select a name from the list, I would like it to auto fill the rest
of
the information on my form based of the information stored in my table.
Is
this possible? If so, how? Thanks for your help.
 

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