PC Review


Reply
Thread Tools Rate Thread

combo box to update record via form

 
 
tecas
Guest
Posts: n/a
 
      18th May 2007
I have a combo box that displays the EmployeeID, FirstName, and
LastName from the Employee Table. The user is to pick the employee and
I want the ID stored in the DataEntry table. The combo box pulls all
of the employees from their table via the following query associated
with the combo box

SELECT tblEmployeeInformation.[Last Name], tblEmployeeInformation.
[First Name], tblEmployeeInformation.[Employee ID]
FROM tblEmployeeInformation
ORDER BY tblEmployeeInformation.[Last Name];

I have the bound column for that combo box set to 3 yet the table
always updates with the employees last name. How to i set this up so
that the table updates with the employee's id number?

 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      18th May 2007
On 18 May 2007 11:36:17 -0700, tecas <(E-Mail Removed)> wrote:

>I have a combo box that displays the EmployeeID, FirstName, and
>LastName from the Employee Table. The user is to pick the employee and
>I want the ID stored in the DataEntry table. The combo box pulls all
>of the employees from their table via the following query associated
>with the combo box
>
>SELECT tblEmployeeInformation.[Last Name], tblEmployeeInformation.
>[First Name], tblEmployeeInformation.[Employee ID]
>FROM tblEmployeeInformation
>ORDER BY tblEmployeeInformation.[Last Name];
>
>I have the bound column for that combo box set to 3 yet the table
>always updates with the employees last name. How to i set this up so
>that the table updates with the employee's id number?


What's the Control Source of the combo box? Do you perhaps have this table
defined as a <yuck!> Lookup Field? Perhaps it's *storing* the ID but the
Lookup is *displaying* the name.

John W. Vinson [MVP]
 
Reply With Quote
 
tecas
Guest
Posts: n/a
 
      18th May 2007
On May 18, 2:43 pm, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
> On 18 May 2007 11:36:17 -0700, tecas <ted.casti...@gmail.com> wrote:
>
> >I have a combo box that displays the EmployeeID, FirstName, and
> >LastName from the Employee Table. The user is to pick the employee and
> >I want the ID stored in the DataEntry table. The combo box pulls all
> >of the employees from their table via the following query associated
> >with the combo box

>
> >SELECT tblEmployeeInformation.[Last Name], tblEmployeeInformation.
> >[First Name], tblEmployeeInformation.[Employee ID]
> >FROM tblEmployeeInformation
> >ORDER BY tblEmployeeInformation.[Last Name];

>
> >I have the bound column for that combo box set to 3 yet the table
> >always updates with the employees last name. How to i set this up so
> >that the table updates with the employee's id number?

>
> What's the Control Source of the combo box? Do you perhaps have this table
> defined as a <yuck!> Lookup Field? Perhaps it's *storing* the ID but the
> Lookup is *displaying* the name.
>
> John W. Vinson [MVP]


I just finished checking my table prior to reading your post and the
previous developer had the field in the table defined as a <yuck!>
combo box. I changed all of the afftected fields (yes, there was more
than one defined that way in the table) and my data magically
appeared.

Thanks for the response.

 
Reply With Quote
 
=?Utf-8?B?VG9tIFdpY2tlcmF0aA==?=
Guest
Posts: n/a
 
      18th May 2007
Hi Tecas,

As you have discovered, Lookups defined at the table (or query) level art
thy creation of thy evil one. See the 2nd Commandment, here:

The Ten Commandments of Access
http://www.mvps.org/access/tencommandments.htm

Access MVP Alumnus Jeff Conrad has a slick add-in tool available that you
can download and install. One of the features of this add-in includes the
ability to quickly locate all table lookups. You might want to give it a try:

CSD Tools Database Documentation
http://www.accessmvp.com/JConrad/acc.../csdtools.html

*Note: This tool has not been updated for Access 2007


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/ex...tributors.html
__________________________________________

"tecas" wrote:

> I just finished checking my table prior to reading your post and the
> previous developer had the field in the table defined as a <yuck!>
> combo box. I changed all of the afftected fields (yes, there was more
> than one defined that way in the table) and my data magically
> appeared.
>
> Thanks for the response.

 
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
How to update a combo box with a new record ericb Microsoft Access 1 17th Nov 2009 12:54 PM
Programmatically Update a Form's Combo Box Default Value and SQL Record Source Desilu via AccessMonster.com Microsoft Access Form Coding 2 24th Jan 2008 09:29 PM
Update combo box in main form from last record entered in subform =?Utf-8?B?TGF1cmFfQ2hyaXN0aWFu?= Microsoft Access Form Coding 2 10th Dec 2005 02:30 AM
Combo box that automatically update a sub-form record Robert Neville Microsoft Access VBA Modules 0 28th Aug 2003 07:22 PM
Combo box that automatically update a sub-form record Robert Neville Microsoft Access Form Coding 1 28th Aug 2003 04:11 PM


Features
 

Advertising
 

Newsgroups
 


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