Full Version: Dlookup on Sub sub form
UtterAccess Forums > Microsoft® Access > Access Forms
I have a form with a subform. On this subform are 4 tabs - all with another subform and these subforms may have subforms.
On one of these tabs, I have:
Subform titled Patient Procedure Form that has two subforms:
Patient Procedure Detail Form
Oalso have a query called Procedure Fee Tally which adds up the fees (Field called Fee) from the table that the Patient Procedure Detail Form is based off of.
I want to add a DLookUp field on the Patient Procedure Detail Form to give the sum of the Fees which is calculated in the Procedure Fee Tally query.
So far I have tried a number of things including: =DLookUp("[SumofFee]","[ProcedureFeeTally]","[ProcedureID]=" & [Forms]![Patient Procedure Detail Form]![procedureID])
I get the #Name error in the text box.
Do I need to include the Form/Subforms/Subforms name also in this?
Yes, you need the complete "path" to the control. That would mean the main form name, subform control name, sub-subform control name, etc. until you get to the correct controls collection.
Here is a web site that can help you with this:
web page
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.