Hi guys! I'm new here and pretty new to Access too. However, I have previous experience in database programming from SAP and Lotus Notes environments.
I have an old database made with Access 97 and I converted it to Access 2003 format. It is a database for assigning employees to different tasks each week, and each employee has a set of tasks they can perform. These are maintained in the table EMPLOYEES. The database keeps track of who has performed which tasks at what date.
The problem:
In one of the forms there are tasks listed and an employee selection listbox for each of them. It should list the employee candidates in order of who's the next in turn AND show only those employees who are allowed to perform that specific task (Employee table has a text field "Class" which can have one to three values to reflect this, for example "K,2,3").
The form has a field "Task" which has one character or number to reflect the task in question.
In the form's Employee selection box attributes the Row source Query is like this:
I'm getting no entries in the listbox selection at all. I suspect the syntax has changed for the wildcard selection in the WHERE-clause but I can't seems to figure out the correct way to do the "Like"-part.
This works well in the older Access 97 when I tested it. And also, if I remove the Like "*|[Task]|*" part it shows me full list of employees, but obviously not filtered by the task type as I'd like to.
I'll be very grateful for any tips regarding this!
I have an old database made with Access 97 and I converted it to Access 2003 format. It is a database for assigning employees to different tasks each week, and each employee has a set of tasks they can perform. These are maintained in the table EMPLOYEES. The database keeps track of who has performed which tasks at what date.
The problem:
In one of the forms there are tasks listed and an employee selection listbox for each of them. It should list the employee candidates in order of who's the next in turn AND show only those employees who are allowed to perform that specific task (Employee table has a text field "Class" which can have one to three values to reflect this, for example "K,2,3").
The form has a field "Task" which has one character or number to reflect the task in question.
In the form's Employee selection box attributes the Row source Query is like this:
Code:
SELECT DISTINCTROW [TAB EMPLOYEES].Employee,
[TAB EMPLOYEES].LastDate,
[TAB EMPLOYEES].LastTask
FROM [TAB EMPLOYEES]
WHERE ((([TAB EMPLOYEES].Class) Like "*|[Task]|*"))
ORDER BY [TAB EMPLOYEES].LastDate;
This works well in the older Access 97 when I tested it. And also, if I remove the Like "*|[Task]|*" part it shows me full list of employees, but obviously not filtered by the task type as I'd like to.
I'll be very grateful for any tips regarding this!