Pauline123
Registered User.
- Local time
- Today, 02:25
- Joined
- Apr 1, 2013
- Messages
- 69
Help! I am slowly losing the will to live
I have a control on a subform that uses the DLookUp function to get a numerical value from a query.
When I use the following in the subform it works fine:
=DLookUp("[TotNoDays]","qryHolEntitCalculation","[HPIDNo]=" & [Forms]![HolidayTakenForm]![ HPIDNo])
But when I use the following when the subform is nested in the main form I keep getting the #Name error:
=DLookUp("[TotNoDays]","qryHolEntitCalculation","[HPIDNo]=" & [Forms]![HolidaysMainForm].[Form]![HolidayTakenForm]![HPIDNo])
The subform is linked to the main form via the EmployeeID number.
Have attached example of problem - tried various combinations without success. Heeelllllppppp - Pauline
I have a control on a subform that uses the DLookUp function to get a numerical value from a query.
When I use the following in the subform it works fine:
=DLookUp("[TotNoDays]","qryHolEntitCalculation","[HPIDNo]=" & [Forms]![HolidayTakenForm]![ HPIDNo])
But when I use the following when the subform is nested in the main form I keep getting the #Name error:
=DLookUp("[TotNoDays]","qryHolEntitCalculation","[HPIDNo]=" & [Forms]![HolidaysMainForm].[Form]![HolidayTakenForm]![HPIDNo])
The subform is linked to the main form via the EmployeeID number.
Have attached example of problem - tried various combinations without success. Heeelllllppppp - Pauline