After Update Confusion


G

Guest

I have a table called Training. Two of its fields are TrainingID and
TrainingName. I have created a Training Subform from this table that is
attached to a main form called Employees. I have set the Training ID field
as a combo box to list all of the Training Programs available. When someone
selects the appropriate Training ID, I would like the TrainingName to
automatically fill in with the appropriate text for the TrainingName. I have
tried After Update but cannot get it correct.

Any help in the proper coding is greatly appreciated.
 
Ad

Advertisements

R

ruralguy via AccessMonster.com

It is not clear if the ComboBox is on the MainForm or the SubForm and where
you have the control that should display the TrainingName. When you make a
selection in the ComboBox, what is left displaying in the control?
 
G

Guest

The combo box for TrainingID is on the Subform. The TrainingName field is
also on the Subform.

Thanx.
 
R

ruralguy via AccessMonster.com

And when you make a selection in the ComboBox, what is left displaying in the
ComboBox?
The combo box for TrainingID is on the Subform. The TrainingName field is
also on the Subform.

Thanx.
It is not clear if the ComboBox is on the MainForm or the SubForm and where
you have the control that should display the TrainingName. When you make a
[quoted text clipped - 9 lines]
 
G

Guest

When I make my selection in the TrainingID combobox, I get a number that
refers to a TrainingName (i.e., Training ID 777 is Training Name Plastics
from the Training Table that is the basis for the Training Subform.

ruralguy via AccessMonster.com said:
And when you make a selection in the ComboBox, what is left displaying in the
ComboBox?
The combo box for TrainingID is on the Subform. The TrainingName field is
also on the Subform.

Thanx.
It is not clear if the ComboBox is on the MainForm or the SubForm and where
you have the control that should display the TrainingName. When you make a
[quoted text clipped - 9 lines]
Any help in the proper coding is greatly appreciated.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

You could just as easily display the Name by changing the ColumnWidths
property on the Format tab of the combobox. 1";0" would hide the second
column. If you change it to 0";1" then the 1st column is hidden.
When I make my selection in the TrainingID combobox, I get a number that
refers to a TrainingName (i.e., Training ID 777 is Training Name Plastics
from the Training Table that is the basis for the Training Subform.
And when you make a selection in the ComboBox, what is left displaying in the
ComboBox?
[quoted text clipped - 9 lines]
 
Ad

Advertisements

G

Guest

Thank you. I will try that.

ruralguy via AccessMonster.com said:
You could just as easily display the Name by changing the ColumnWidths
property on the Format tab of the combobox. 1";0" would hide the second
column. If you change it to 0";1" then the 1st column is hidden.
When I make my selection in the TrainingID combobox, I get a number that
refers to a TrainingName (i.e., Training ID 777 is Training Name Plastics
from the Training Table that is the basis for the Training Subform.
And when you make a selection in the ComboBox, what is left displaying in the
ComboBox?
[quoted text clipped - 9 lines]
Any help in the proper coding is greatly appreciated.
 
Ad

Advertisements

J

John W. Vinson

I have a table called Training. Two of its fields are TrainingID and
TrainingName. I have created a Training Subform from this table that is
attached to a main form called Employees. I have set the Training ID field
as a combo box to list all of the Training Programs available. When someone
selects the appropriate Training ID, I would like the TrainingName to
automatically fill in with the appropriate text for the TrainingName.

Why?

It's redundant and unnecessary. You're using a relational database - use it
relationally! If you're storing the TrainingID, you can and should use a Query
(or a combo box, or one of the many other tools Access provides) to store the
training name, rather than making an extra copy of the name in every record in
the training table.

John W. Vinson [MVP]
 

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