V
Virgil Layne
The code I gave in the previous post was incorrect.
Here's the correct version that I tried.
Private Sub Form_Current()
If IsNull
(Me.fsubFill.Form.RecordsetClone.RecordCount) Then
Me.fsubFill.SourceObject = "fsub2"
Me.fsubFill.LinkMasterFields
= "IDNumber" 'primary key
Me.fsubFill.LinkChildFields = "IDNumber"
Else
Me.fsubFill.SourceObject = "fsub1"
Me.fsubFill.LinkMasterFields = "IDNumber"
Me.fsubFill.LinkChildFields = "IDNumber"
End If
As info, I'm trying to substitute another subform when the
default subform has no records. Access does not load the
second form using this code, just makes the first form
turn blank.
Here's the correct version that I tried.
Private Sub Form_Current()
If IsNull
(Me.fsubFill.Form.RecordsetClone.RecordCount) Then
Me.fsubFill.SourceObject = "fsub2"
Me.fsubFill.LinkMasterFields
= "IDNumber" 'primary key
Me.fsubFill.LinkChildFields = "IDNumber"
Else
Me.fsubFill.SourceObject = "fsub1"
Me.fsubFill.LinkMasterFields = "IDNumber"
Me.fsubFill.LinkChildFields = "IDNumber"
End If
As info, I'm trying to substitute another subform when the
default subform has no records. Access does not load the
second form using this code, just makes the first form
turn blank.