I want to create a different rowsource-query for a lookup field (field1) in each record in a subform.
The rowsource changes dependent on the value in another field (field2) in the same record.
How can this be done?
- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible.
- i think i have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query
something like:
lookup field1 in the subform contains this rowsource
- SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME
FROM CUSTOMERS
WHERE (CUSTOMER.AGE= me![field2]);
me![field2] however does not function
please HELP !!