I have a Sub form (in Data sheet view) in my Main form. This datasheet form has 3 fields (namely Process, Detection and System) . I also have 3 text-boxes just below this Sub form (which can be called as ProcessFinal, DetectionFinal and SystemFinal). Is there any way to auto populate the last filled row in the Sub form to these text boxes below? The maximum number of rows that will be used in the sub form is 5.
I am new to Access. Any help is much appreciated.
Place 3 textboxes in subform footer section with expressions like: =Last([Process])
. These textboxes will not display in datasheet view, however, main form can reference them, like:
=[subform container name].Form.tbxLastProc
Be aware any changes in subform record order or filtering will change what the 'last' record is.
Thanks for the answer. However, the 3 text boxes in the Main form are displaying #Name? instead of the last value. The expression I used was =[Forms]![sub-form name].[Form]![text-box name]. I got the same result when I used the referencing in the answer as well.
It finally worked. I used expression build for referencing and found out that I had been using wrong sub form name. Thanks for your help.
Glad it worked. My testing did not require
[Forms]!
. I don't use expression builder. Could mark answer as accepted.