BlueRhinos
Board Regular
- Joined
- Aug 31, 2007
- Messages
- 83
Within a query, I'd like to add a field using the dlookup function. Instead of using static values in the criteria part of the function, I'd like to use a parameter to keep it dynamic. The online example suggests preceding the field value with Form! to tell Access that the field reference, "Person ID," comes from the current form.
When I use this syntax, i get the following error message: "MS Access can't find the name
Form![Person ID] you entered in the expression.
I've experimented by replacing Form! with:
(1) Query!
(2) [query name].[Person ID]
Here's a visual:
Record:
Person Person ID Manager Manager ID NEW DLoopfield (Manager's Manager)
Dave 1 Scott 2 Donna
Scott 2 Donna 3 Erin
so, my function says give me Manager from Table A where the Person ID = Manager ID from this table.
Can someone help me solve...I can't think of any other intuitive syntax.
Thanks!
BlueRhinos
When I use this syntax, i get the following error message: "MS Access can't find the name
Form![Person ID] you entered in the expression.
I've experimented by replacing Form! with:
(1) Query!
(2) [query name].[Person ID]
Here's a visual:
Record:
Person Person ID Manager Manager ID NEW DLoopfield (Manager's Manager)
Dave 1 Scott 2 Donna
Scott 2 Donna 3 Erin
so, my function says give me Manager from Table A where the Person ID = Manager ID from this table.
Can someone help me solve...I can't think of any other intuitive syntax.
Thanks!
BlueRhinos