Consider those two tables in Access 2010:
ActionReg
ActionID Taskt1 Actiont1
1 t1 t1a1
2 t2 t2a1
3 t3 t3a1
4 t1 t1a2
5 t1 t1a3
6 t2 t2a2
TaskReg
ActionID Taskt2 Actiont2
1 t1
2 t2
3 t3
I give the field Actiont2 the following properties (in Lookup tab in Design View):
- Display Control = ListBox
- Row Source Type = Table/Query
Now I want this query to retrive from Actiont1 into Actiont2 the records related only to the value of Task2 so the result will be:
TaskReg
ActionID Taskt2 Actiont2
1 t1 (t1a1,t1a2,t1a3)
2 t2 (t2a1,t2a2)
3 t3 (t3a1)
I used:
SELECT ActionReg.Action1
FROM ActionReg, TaskReg
WHERE [ActionReg]![Task1]=[TaskReg]![Task2];
But it retrives all records in Action1 if Task1 = any record in Task2.
Try using INNER JOIN in your Query.