Oops-Matching Data Types

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a number of issues with my Database. I was told that I should not
make list boxes in Table Design...that all of that should be done in Forms
Design. I did that and now when I do a Query on that inormation, Instead of
bring up the Employee Name, for example, it gives me the auto number in the
Primary Key. How can I get it to bring up the name?
 
Hi Rich

I assume you're querying a table that is on the "many" side of a one-to-many
relationship with your Employees table. Let's say it's the Sales table. It
will have a numeric field in it to link to the employee who made the sale
(this is called a "foreign key").

To see the name of the employee in your query, instead of the ID number, add
the Employees table to your query design, and add the employee's first and
last names (and any other details you want) to the query grid. If you have
created the relationship properly, then adding the table will automatically
show a bold line linking the EmployeeID fields in the two tables.
 
I have a number of issues with my Database. I was told that I should not
make list boxes in Table Design...that all of that should be done in Forms
Design. I did that and now when I do a Query on that inormation, Instead of
bring up the Employee Name, for example, it gives me the auto number in the
Primary Key. How can I get it to bring up the name?

By creating a Query joining this table to the employee table; and/or
by using a Combo Box or Listbox control on your form, bound to the
employeeID but displaying the employee name.

John W. Vinson[MVP]
 
In the properties of listbox on the form set the number of fields to at least
2 and bind the field for the autonumber and set it's display wifth to 0
(zero) and set the witdth of the name field as necessary.
 

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

Back
Top