Combobox control source differs from view

N

NeoFax

I have a form that allows the input of personell and their
supervisor. I use the same table for both the supervisor and employee
and just update the field supervisorID to match the primary key of the
table. However, on the form I want to show the Supervisors
BadgeNumber but write the primary key number to the SupervisorID.
This is not working. I have tried pretty much everything I can think
of to do this other than duplicating the table. Here is what the table
looks like:

nameID(PK) autoNumber
FirstName Text
LastName Text
BadgeNum Text
Department Text
WorkNum Text
SupervisorID Number (should equal nameID of supervisor)
 
A

Allen Browne

Set the combo's RowSource like this:
SELECT NameID, BadgeNum
FROM tblEmployee
ORDER BY BadgeNum;

Other properties:
Control Source: SupervisorID
Row Source Type: Table/Query
Bound Column: 1
Column Count: 2
Column Widths: 0
 
N

NeoFax

Set the combo's RowSource like this:
    SELECT NameID, BadgeNum
    FROM tblEmployee
    ORDER BY BadgeNum;

Other properties:
    Control Source:     SupervisorID
    Row Source Type: Table/Query
    Bound Column:     1
    Column Count:      2
    Column Widths:    0

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.







- Show quoted text -

Thanks!
 

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