Table Problem

  • Thread starter Thread starter Nick Jax
  • Start date Start date
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
 
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
 
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.
 
Hello again Rick..did some looking around..gonna try COMBO BOX..unless there
are commandments against those too!! haha
 
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.
 
Back
Top