I have an unbound text box in a form where I need to look up a value from a query called qry_Fees to obtain the value in the field [SumOfFee] where the field [Picture Index] in the query is the same as the field [PictureIndex] in the form and am using the DLookUp formula below
DLookUp("[qry_Fees]![SumOfFee] ","qry_Fees"," [qry_Fees]![PictureIndex] = [PictureIndex]"
When the form is opened the value is correct for the first record, but when I scroll through the records it remains the same. I have read numerous threads and have not found a solution. I have tried putting code to both refresh the query (which I don't be lieve is necessary) and recalculate the form, but may not have put them in the right place.
My questions are:
1. Is there a problem with my syntax for the DlookUp
2. Where should I put any code so that the field updates as the records are scrolled through
3. What code should I useI have been trying to solve this for ages, so any help would be really appreciated.