Nancy Lytle
lytlenj at yahoo.com
Wed Sep 15 11:02:31 CDT 2004
I have a form that contains a subform. I would like this subform to be unbound and not visible until a button is clicked on the main form. I cannot get the subform bound properly. I get the "The expression you entered refers to an object that is closed or doesn't exist" error. I had it at one time and lost it. Any ideas? TIA Nancy The name of the subform control is sbffrmReceiving The name of the subform is frmReceiving I put the name of the subform control it the control's tag property. This is the code I am using: Private sub cmdOpenRec_Click(): Me.sbffrmReceiving.Visible = True Me.sbffrmReceiving.SetFocus If Len(Me.sbffrmReceiving.Form.SourceObject) = 0 Then Me.sbffrmReceiving.Form.SourceObject = Me.sbffrmReceiving.Form.Tag Me.sbffrmReceiving.Form.LinkChildFields = Forms!Me.sbffrmReceiving.Form.LinkChildFields Me.sbffrmReceiving.Form.LinkMasterFields = Me.sbffrmReceiving.Form.LinkMasterFields End If