Hello,
I have form in datasheet view that has multiple nested subforms in it and I'm having the odd issue that they work and show the data they need to show... except not on the first record... and only when not viewing last subform in its immediate parent.
My layout:
Main Parent Form is called Emp which has a child subform called EmpPos
EmpPos has a child subform called EmpPosInf
and EmpPosInf has a child subform called EmpPosInfFall
EmpPosInf is set to programatically select a form to bind to the control (named PPLoader) on loading depending on what is selected from a list provided on a main form.
Please note: I currently have the code working... it binds the correct form. I also have the correct fields bound as the information is updateable/writeable.
When opening the form EmpPosInf, all data is shown as needed. But, as soon as I open EmpPosInf as a child form the first record seems to disappear in all cases.
Below is the code that I have executing on load of EmpPosInf:
Thanks in advance for your help.Code:Private Sub Form_Load() On Error Resume Next Dim strSubformName As String If Forms![Test Opener]!PPList = "Fall" Then strSubformName = "Emp Pos Inf Fall" ElseIf Forms![Test Opener]!PPList = "Fall/Spring" Then strSubformName = "" ElseIf Forms![Test Opener]!PPList = "Spring" Then strSubformName = "[Emp Pos Inf Spring]" ElseIf Forms![Test Opener]!PPList = "Summer" Then strSubformName = "[Emp Pos Inf Summer]" ElseIf Forms![Test Opener]!PPList = "All" Then strSubformName = "" End If Me.PP_Loader.SourceObject = strSubformName Me.PP_Loader.LinkMasterFields = "Emp_Inf_ID" Me.PP_Loader.LinkChildFields = "Emp_Inf_ID" Me.PP_Loader.Visible = True End Sub






