Greetings everybody,
I am using an afterupdate event on my main form that changes the source object of my subform. This works fine.
If a control on that subform = true, I want to change the source object again. This is where my code fails. I get an error message stating it can't find that field. My code below.
Thanks for your help.
John
I am using an afterupdate event on my main form that changes the source object of my subform. This works fine.
If a control on that subform = true, I want to change the source object again. This is where my code fails. I get an error message stating it can't find that field. My code below.
Code:
Private Sub strIns_AfterUpdate()
Me.tblDefCatDump_subform1.Requery
Me.Command45.Visible = True
Me.Command44.Visible = True
Me.Command47.Visible = True
Me.tblDefCatDump_subform1.Visible = True
Me.Label126.Visible = True
Me.Label127.Visible = True
Me.[tblDefCatDump subform1].SourceObject = "frmInsCont1"
If Forms!frmSCOrd![tblDefCatDump subform1].Form!ysnPrefix = True Then '(Problem here)
Me.[tblDefCatDump subform1].SourceObject = "frmPrefix1"
End If
End Sub
Thanks for your help.
John