Re: Form for table

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



schongresh wrote:
Here's the problem:

Access 2003, XP Pro-

I have three tables that are related by primary keys. I have a
table[Table QC] that has the field [EmployeeID], the data type is
number--that field is linked to the autonumber primary key of the
Employees Table. So far so good. I am trying to make a form that has a
combo box that looks to the Employee Table to get me the drop down of
the employees (Last Name, First Name). The SQL statement builds out
okay, and I get the correct name config., but because the data type is
a number it won't accept the data. I looked at the Northwind example
and it is identical to what I am trying to do. I have the properties
set identically. In the Northwind example the names show in the field
Last Name, First Name, but the data type is set for number. I must be
missing something simple. Please help.

Thanks,

Sean

The ComboBox needs to have a hidden column containing the numeric ID value and
you make that the bound column. The control displays text but has a numeric
value. If you look again at Northwind you will see that this is how they have
it set up.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Form for table
    ... I have three tables that are related by primary keys. ... the employees. ... In the Northwind example the names show in the field ... Last Name, First Name, but the data type is set for number. ...
    (microsoft.public.access.forms)
  • Re: Form for table
    ... number--that field is linked to the autonumber primary key of the ... the employees. ... In the Northwind example the names show in the field ... Last Name, First Name, but the data type is set for number. ...
    (microsoft.public.access.forms)
  • Re: What are common indexes?
    ... Index on primary keys in all three tables. ... > SELECT e.last_name, e.first_name from employees e, departments d, ... > ALTER TABLE employee_addresses ADD FOREIGN KEY REFERENCES ... search for city,state then an index on city state would work. ...
    (comp.databases.oracle.server)
  • MySQL query on multiple tables ?
    ... I currently have several tables in MySQL database. ... (Data type for each fields are ignored) ... Search for usersin a particular city/state/zipcode that ... The primary keys are from table "user". ...
    (comp.lang.php)
  • primary keys having text data type
    ... I've got some primary keys whose values look like numbers, such as 100434, ... but they have a text data type instead of a number data type. ... I ran the Performance Analyzer, and it suggested converting the data types ... some time modifying the queries and the VBA code that refers to the fields. ...
    (microsoft.public.access.tablesdbdesign)