Combobox for current/terminated employees (1 Viewer)

nschroeder

nschroeder
Local time
Today, 04:06
Joined
Jan 8, 2007
Messages
186
I'm creating an Audit form with a combobox from which the employee name performing the audit can be selected. The data source is the EmpNames query which selects from the Employees table, linked to another database. The EmpNames query includes a record selection criteria where Employees.TermDate is null so that terminated employees will not appear in the dropdown list.

This is fine as audit records are being added in the form for current employees, but in the future, if an employee is terminated and we go back to one of his audit records, the name will be blank because EmpNames won't include it. The Audit table doesn't store the employee's name -- just his employee ID, and the combobox has a two-column data source where the column 1 width is 0 and column 2 is the name. Is there a way to have only current employees be selectable but still be able to see terminated employees in existing audit records?
 

spikepl

Eledittingent Beliped
Local time
Today, 11:06
Joined
Nov 3, 2010
Messages
6,142
You could have a second column, showing who is selectable (employed etc) and who isn't (terminated), among all. And if users selects one of the unselectables you could pop a message and undo the selection.
 

nschroeder

nschroeder
Local time
Today, 04:06
Joined
Jan 8, 2007
Messages
186
I don't want terminated employees to appear on the list. Otherwise, they'll be calling me saying, "please remove so-and-so from the list, he no longer works here".
 

spikepl

Eledittingent Beliped
Local time
Today, 11:06
Joined
Nov 3, 2010
Messages
6,142
I have responded to the requirement "have only current employees be selectable but still be able to see terminated employees in existing audit records?"

Now if you have a different requirement that will take some more fiddling. Edit: some more fiddling by somebody else.
 

nschroeder

nschroeder
Local time
Today, 04:06
Joined
Jan 8, 2007
Messages
186
I resolved it by storing the actual employee name in the audit file, instead of the employee ID, switching the column count to 1, and changing the Limit to List parameter to No. It's not as efficient, storage-wise, but it solves the problem.
 

Users who are viewing this thread

Top Bottom