Table Problem

N

Nick Jax

I have a database with two tables. (Access 2003)

In table1, there is a lookup field that uses table2 (table2 contains
employee names).

For some reason, Access is assigning the data type of that field to NUMBER.
When I try
to do a query on that field based on a persons name (Smith, John), I get a
data type mismatch.
But Access won't allow me to set the data type..it does it on it's own.

What am I doing wrong?

Thanks
 
R

Rick Brandt

Nick said:
I have a database with two tables. (Access 2003)

In table1, there is a lookup field that uses table2 (table2 contains
employee names).

For some reason, Access is assigning the data type of that field to
NUMBER. When I try
to do a query on that field based on a persons name (Smith, John), I
get a data type mismatch.
But Access won't allow me to set the data type..it does it on it's
own.

What am I doing wrong?

Thanks

Using a lookup field. When doing so you are NOT seeing what is in Table1
you are seeing what is in Table2. Is this confusing? Yes, and that is why
the use of lookup fields is discouraged.

See commandment number 2 at...
http://www.mvps.org/access/tencommandments.htm
 
N

Nick Jax

Thanks Rick...but then how would I accomplish the same result by not using a
lookup field?

I want the user to be able to select the employee name from a drop down
menu.
 
N

Nick Jax

Hello again Rick..did some looking around..gonna try COMBO BOX..unless there
are commandments against those too!! haha
 
R

Rick Brandt

Nick said:
Hello again Rick..did some looking around..gonna try COMBO
BOX..unless there are commandments against those too!! haha

Absolutely not. The use of ComboBoxes and lookup *tables* is perfectly fine
and reflects proper design. It is only the use of lookup *fields* that is
not a good idea.
 

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