List Box or Combo Box Problem

A

Annelie

I created a small table, where the user inputs misc pay items like retro
pay.
To make input easier, I create a list box (also tied combo box with same
result) in the table for the employee name.
Set up as such:
List Box
Table/Query
TblEmployeeList
Bound Col 1 (indexed employee number)
Col count 2 (employee name)
Col Widths: 0",2"

It doesn't work just using bound col 2, col count 1

Everything works just fine until I want to append this data to the other
imported payroll data table. When I look a the append Query before updating,
everything looks just fine, but when it actually updates, it drops the
employee number instead of the name into the table.

How can I fix this. Since this is all imported data, I am not adding the
employee number to the data until later.

Annelie
 
S

Steve Schapel

Annelie,

I am not really sure how to fix it. However, it will help you a lot
to follow these two cardinal rules:
1. Never use a Table for data entry
2. Never use a Lookup field

In fact, Access has done exactly what you asked it to do. Bound
Column means the column in the list/combo box that is stored in the
field. In your case, this is the Employee Number. Just because you
can't see it (because of Column Width = 0") doesn't alter the fact
that this is the data. So when you use this field in an Append Query,
this is the data that is appended. Simple as that.

- Steve Schapel, Microsoft Access MVP
 
A

Annelie

I do understand what you say. However, it is impossible to enter data into a
table, form or query, unless you can type some letters und look up a field
because of spelling problems, or initial or not or you will never find the
correct name. I was not able create a relation ship to the employee table in
the append query. Perhaps I need to do another query first to relate the
autonumber to the name. I should have some kind of lookup to find the
correct employee. I need some lookup that lets me select an employee and
then fills in the number and the name in the correct column. I really do
need a solution.
I can, through a query, attach the employee number to the existing table
that I want to attach the append query to. Perhaps the data entry needs to
be on a form which uses an unbound combobox so select the employee??
Annelie
I am keeping my finger crossed for a solution.
 
S

Steve Schapel

Annelie,

Ideally, you should change the table you are appending to so it has a
field for the Employee Number. However, if for some unknown reason
you can't do this, and you *must* append the Employee Name... Why
can't you include the Employee table in the Append Query?

Maybe it would help if you could let us know the fields of the
Employee table and the table your append query is based on.

- Steve Schapel, Microsoft Access MVP
 

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