Populate text boxes and update table

V

visidro

I have a form that contains a combo box and two text boxes (among other
things). When the user chooses a name from the "students" table the other
two text boxes get populated with the corresponding values "age" and
"gender". this is working fine.
I would like to have all three boxes update another table (class), in other
words save these values. The combo box works fine but not the text boxes ....
I am fairly new to access I would really appreciate someones help on this.

thank you in advance
victor
 
J

Jeff Boyce

No, you actually don't!

If your "other" table gets a name, an "age" and a "gender" saved, then
someone has a birthday (or a serious operation), you will have to find all
the tables in which you've stored those pieces of information and update
them.

If you already have a table that contains students' names, you'll only need
to store the rowID in your "other" table to indicate which student. And if
your table of students contains a date of birth, you will be able to use a
query to dynamically determine (calculate) an "age" whenever you need it --
no need for updating! I'd probably store [gender] in that same students
table, and only there.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
V

visidro

Thanks Jeff, I see what you mean.
Then, how do I capture and store the rowid, I do have both tables linked.

thanks
victor

Jeff Boyce said:
No, you actually don't!

If your "other" table gets a name, an "age" and a "gender" saved, then
someone has a birthday (or a serious operation), you will have to find all
the tables in which you've stored those pieces of information and update
them.

If you already have a table that contains students' names, you'll only need
to store the rowID in your "other" table to indicate which student. And if
your table of students contains a date of birth, you will be able to use a
query to dynamically determine (calculate) an "age" whenever you need it --
no need for updating! I'd probably store [gender] in that same students
table, and only there.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

visidro said:
I have a form that contains a combo box and two text boxes (among other
things). When the user chooses a name from the "students" table the other
two text boxes get populated with the corresponding values "age" and
"gender". this is working fine.
I would like to have all three boxes update another table (class), in
other
words save these values. The combo box works fine but not the text boxes
....
I am fairly new to access I would really appreciate someones help on this.

thank you in advance
victor
 
J

Jeff Boyce

Victor

One way would be to have a form based on (a query based on) the "other"
table. In that form, use a combo box bound to the PersonID (rowID) field in
the "other" table (this is the foreign key that points back to the Person
table row). The combo box's RowSource is the Person table, hiding the
Person/RowID and displaying the name (this makes it easier for the user to
find the right person).

Regards

Jeff Boyce
Microsoft Office/Access MVP

visidro said:
Thanks Jeff, I see what you mean.
Then, how do I capture and store the rowid, I do have both tables linked.

thanks
victor

Jeff Boyce said:
No, you actually don't!

If your "other" table gets a name, an "age" and a "gender" saved, then
someone has a birthday (or a serious operation), you will have to find
all
the tables in which you've stored those pieces of information and update
them.

If you already have a table that contains students' names, you'll only
need
to store the rowID in your "other" table to indicate which student. And
if
your table of students contains a date of birth, you will be able to use
a
query to dynamically determine (calculate) an "age" whenever you need
it --
no need for updating! I'd probably store [gender] in that same students
table, and only there.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

visidro said:
I have a form that contains a combo box and two text boxes (among other
things). When the user chooses a name from the "students" table the
other
two text boxes get populated with the corresponding values "age" and
"gender". this is working fine.
I would like to have all three boxes update another table (class), in
other
words save these values. The combo box works fine but not the text
boxes
....
I am fairly new to access I would really appreciate someones help on
this.

thank you in advance
victor
 
V

visidro

Thanks for your help Jeff I'll do that.
victor

Jeff Boyce said:
Victor

One way would be to have a form based on (a query based on) the "other"
table. In that form, use a combo box bound to the PersonID (rowID) field in
the "other" table (this is the foreign key that points back to the Person
table row). The combo box's RowSource is the Person table, hiding the
Person/RowID and displaying the name (this makes it easier for the user to
find the right person).

Regards

Jeff Boyce
Microsoft Office/Access MVP

visidro said:
Thanks Jeff, I see what you mean.
Then, how do I capture and store the rowid, I do have both tables linked.

thanks
victor

Jeff Boyce said:
No, you actually don't!

If your "other" table gets a name, an "age" and a "gender" saved, then
someone has a birthday (or a serious operation), you will have to find
all
the tables in which you've stored those pieces of information and update
them.

If you already have a table that contains students' names, you'll only
need
to store the rowID in your "other" table to indicate which student. And
if
your table of students contains a date of birth, you will be able to use
a
query to dynamically determine (calculate) an "age" whenever you need
it --
no need for updating! I'd probably store [gender] in that same students
table, and only there.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

I have a form that contains a combo box and two text boxes (among other
things). When the user chooses a name from the "students" table the
other
two text boxes get populated with the corresponding values "age" and
"gender". this is working fine.
I would like to have all three boxes update another table (class), in
other
words save these values. The combo box works fine but not the text
boxes
....
I am fairly new to access I would really appreciate someones help on
this.

thank you in advance
victor
 

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