By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,508 Members | 2,949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,508 IT Pros & Developers. It's quick & easy.

Exit Event

P: n/a
Hi,

I'm relatively new to Access and have never used VBA before. So try and
bear with me.

I have a form. On the form there is a combo box, with the "row source
type" set to value list. The combo box lists 28 different schools. Each
school has a unique ID code associated to it. For example,

School Name = Anson Park School ID = 1
School Name = Cliffside School ID = 2

However, the user will not know the ID code. They will merely know the
school name. I want the user to select the name from the combo box and
then use code to populate the adjacent School ID text box.

Is it possible to have the user select the school. Then use the exit
event procedure to populate the adjacent school ID text box when the
user tabs to the next object on the form.

Can someone lead me in the right direction of where to start if I am
trying to accomplish this task.

Chris

Jun 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Meaney wrote:
Hi,

I'm relatively new to Access and have never used VBA before. So try
and bear with me.

I have a form. On the form there is a combo box, with the "row source
type" set to value list. The combo box lists 28 different schools.
Each school has a unique ID code associated to it. For example,

School Name = Anson Park School ID = 1
School Name = Cliffside School ID = 2

However, the user will not know the ID code. They will merely know the
school name. I want the user to select the name from the combo box and
then use code to populate the adjacent School ID text box.

Is it possible to have the user select the school. Then use the exit
event procedure to populate the adjacent school ID text box when the
user tabs to the next object on the form.

Can someone lead me in the right direction of where to start if I am
trying to accomplish this task.

Chris


The Proper way would be to store only the SchoolID in your record and merely
*display* the school name. The ComboBox can do all of that for you by
itself. Just set its ControlSource to the SchoolID field in your table and
make its BoundColumn property point to the column in the RowSource
containing the SchoolID. The second TextBox for SchoolID can then just be
eliminated.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Jun 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.