Data to textbox

G

Guest

Hey

My knowledge of access is 1 day old please excuse this question if it seems
common sense.

I have a form with combo box saying "person"
then I have a textbox below it saying "age" right,

Person is populated through a query saying "select person from members"
Once I select the person name from the dropdown I now "expect" to see his
age populated in the textbox.

In order to do that I wrote a query that returns the age of the person
according to the value in the box, now this works fine when I'm using a combo
box instead of a textbox to show the name.

When I use textbox I can't even get the option to specify it's data , so I
tried use a listbox, this doesn't work either but if my control is a combo
box the moment I change the name that age is display accordingly...

The effect that I want to achieve is having the age displayed in a read only
textbox once I select the person. What is the best way of doing this.

TIA
 
R

Rick B

The big question here is how you are storing and returning age. You should
not store a person't age (it is a moving target). You should store their
birthdate. You can then calculate your age in the forms, reports, and
queries.

As far as grabbing data and populating your table, I'd suggest you look at
the Northwind database that comes with Access. In the Order form, there is
a drop-down to allow you to select a customer. When you do so, many other
fields on the form fill in. You would want to do something similar.

Post back if you need more help, but get your data normalized first.
Storing age does not really make sense in most applications.
 

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