This is probably pretty simple, but I'm having difficulty. After setting up my tables, table relationships, and a form, I'm having trouble with drop boxes and SELECT DISTINCTROW.
The main table is for Orders. The other tables are information on Employees, and Buyers and Sellers. The Buyers and Sellers are both on the same table, because the same entries are sometimes used for either.
I'm trying to attach the primary keys for buyer, seller, and employee to each order with a drop box in the form that uses the names of each. The code I'm using is:
rowsource: SELECT DISTINCTROW [Employees].[EmployeeID], [Employees].[EmployeeName] FROM [Employees] ORDER BY [EmployeeName];
For some reason, this works fine for my employee dropbox, but using the same code (changing necessary fields) for my buyers and sellers won't work. It displays the primary keys in the dropbox instead. If I reverse [EmployeeID] and [EmployeeName], the name is displayed, but this isn't helpful because it tries to use the employee name instead of the ID in the table.
Is this because my Buyer/Seller table is much larger, or because it is linked to multiple fields in my Orders? Or is there something else I'm missing?
The main table is for Orders. The other tables are information on Employees, and Buyers and Sellers. The Buyers and Sellers are both on the same table, because the same entries are sometimes used for either.
I'm trying to attach the primary keys for buyer, seller, and employee to each order with a drop box in the form that uses the names of each. The code I'm using is:
rowsource: SELECT DISTINCTROW [Employees].[EmployeeID], [Employees].[EmployeeName] FROM [Employees] ORDER BY [EmployeeName];
For some reason, this works fine for my employee dropbox, but using the same code (changing necessary fields) for my buyers and sellers won't work. It displays the primary keys in the dropbox instead. If I reverse [EmployeeID] and [EmployeeName], the name is displayed, but this isn't helpful because it tries to use the employee name instead of the ID in the table.
Is this because my Buyer/Seller table is much larger, or because it is linked to multiple fields in my Orders? Or is there something else I'm missing?