PC Review


Reply
Thread Tools Rate Thread

Combo box to fill text boxes..

 
 
George
Guest
Posts: n/a
 
      26th Feb 2010
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
 
Reply With Quote
 
 
 
 
Daryl S
Guest
Posts: n/a
 
      26th Feb 2010
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 S


"George" wrote:

> 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
> .
>

 
Reply With Quote
 
George
Guest
Posts: n/a
 
      26th Feb 2010
Daryl S wrote:
> 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
 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      26th Feb 2010
On Fri, 26 Feb 2010 10:57:25 -0500, George <(E-Mail Removed)>
wrote:

>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/acc...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

--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill three combo boxes Doug Microsoft C# .NET 2 13th Jun 2007 12:53 PM
Data Access Page-Auto fill text boxes based on combo box selection =?Utf-8?B?UmljaGllX0JhdGhvcnk=?= Microsoft Access VBA Modules 0 14th Feb 2007 03:05 PM
Auto fill text boxes from combo box *or* print report of one recor =?Utf-8?B?Y3ByYXY=?= Microsoft Access Forms 2 29th Sep 2006 06:36 PM
Fill a Combo Box with two text boxes values raymondskelton@hotmail.com Microsoft Access Form Coding 2 9th Mar 2006 09:45 PM
Combo Boxes to fill List Box PR Microsoft Access Forms 1 21st Dec 2005 02:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 PM.