Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box displaying data problem

Status
Not open for further replies.

topdesk123

Programmer
Sep 27, 2001
76
0
0
US
Good morning - I have numerous combo boxes throughout my program forms that users can choose the Employee's Name for various reasons. The Employees Name information comes from the Employees table obviously. I also have criteria set: "terminationdate=null", so that only current employees can be selected. Problem is, previously selected employees who have since become terminated no longer show up on the forms. I have tried every combination I can think of to store the data and have been unsuccessful. Does anyone have any ideas?

Here is the actual:
SELECT Employees.EmployeeID, Employees.FirstName, Employees.LastName, Employees.TerminationDate, [firstname] & " " & [lastname] AS Expr1
FROM Employees
WHERE (((Employees.TerminationDate) Is Null))
ORDER BY Employees.FirstName, Employees.LastName;

TIA!
 
How are ya topdesk123 . . .

By chance are you using the [blue]same criteria[/blue] in the [blue]RecordSource[/blue] of the forms?



Calvin.gif
See Ya! . . . . . .
 
topdesk123 . . .

Can't see anything like this happening unless the combo's are bound. Specifically if the bound column of the combo's is the [blue]primarykey[/blue] and the [blue]recordsource[/blue] of the form is the same, [purple]how is the record to be displayed when the recordsource saids yes but the bound combo saids no?[/purple]

Whats the Bound Column property value?





Calvin.gif
See Ya! . . . . . .
 
In the Customer Notes form for example, the bound column for the "By" field is EmployeeID (the name of the field is "By"). In the Customer Notes table, "by" is a straight up, plain old text field (at the moment). The combo-box row source in the form is:

SELECT Employees.EmployeeID, Employees.FirstName, Employees.LastName, [firstname] & " " & [lastname] AS Name, Employees.TerminationDate FROM Employees WHERE (((Employees.TerminationDate) Is Null)) ORDER BY Employees.FirstName, Employees.LastName;

Column Count=5
Column Widths: 0";0";0";0";1.5"
Bound Column=1

My thinking is - since the "By" field in the table is not a lookup field, nor does it contain any criteria, it should save whatever has been chosen - which it DOES (save the employee id in the table)- it just will not display the Name, only the number. Clear as mud?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top