Combo box to fill text boxes..

  • Thread starter Thread starter George
  • Start date Start date
G

George

A form has one combo box and 3 text boxes. This form has the Record
Source set to a table containing employee scoring information. The
combo box contains employee ID numbers. Based on the selection from the
combo box the three text boxes will display the employee name, employee
area, and an evaluation score.

Currently the combo box has a Row Source:
SELECT ScoresTbl.EmpNum, ScoresTbl.EmpName, ScoresTbl.EmpArea,
ScoresTbl.OverAllEval FROM ScoresTbl ORDER BY ScoresTbl.EmpNum;

Once the EmpNum is selected or an AfterUpdate event on the combo box,
then the appropriate text boxes are filled with the matching
information. Unfortunately, this somehow modifies the ScoresTbl.

How does the ScoresTbl get modified?

Is there a way to perform this task by using a query? I tried setting
the Record Source to a query that contained the four needed fields from
the ScoreTbl, but was unsure how to get the information back to the text
boxes in the form.

Any help is greatly appreciated.

Thank you,
George
 
George -

If you are using the combo box to select a value, make sure it is not bound
to the recordsource of the form. If it is bound to the form, then you will
over-write the current form record with what you select. Also, if you are
populating the text boxes from the combo box, then these values will also
update the record on the form.

If you are using a combo box to select a record to display, then you don't
want the combo box to be bound. The AfterUpdate event should then add a
filter to the current form to restrict which records are being shown, rather
than updating the data in the field.
 
Daryl said:
George -

If you are using the combo box to select a value, make sure it is not bound
to the recordsource of the form. If it is bound to the form, then you will
over-write the current form record with what you select. Also, if you are
populating the text boxes from the combo box, then these values will also
update the record on the form.

If you are using a combo box to select a record to display, then you don't
want the combo box to be bound. The AfterUpdate event should then add a
filter to the current form to restrict which records are being shown, rather
than updating the data in the field.
I just finished the "Access 97 Bible", what other material would be
recommended for more advanced reference?

Thenks
 
I just finished the "Access 97 Bible", what other material would be
recommended for more advanced reference?
Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
 
Back
Top