A
aubjf
I just wanna know if it is possible to set different LinkChildFields value
depending
of the value from a other field in the Datasheet form ? The following code
don’t work because the subform keep the last LinkChildFields value I set.:
Dim i, iCount As Integer
iCount = Me.Recordset.RecordCount
For i = 1 To iCount - 1
If Me.txtType = "Act" Then
Me.subPaieBon.LinkChildFields = "FKPaieAct"
End If
If Me.txtType = "Pub" Then
Me.subPaieBon.LinkChildFields = "FKPaiePub"
End If
If Me.txtType = "Mb" Then
Me.subPaieBon.LinkChildFields = "FKPaieMb"
End If
On Error GoTo err
RunCommand acCmdRecordsGoToNext
Next
err:
Thank in advance
depending
of the value from a other field in the Datasheet form ? The following code
don’t work because the subform keep the last LinkChildFields value I set.:
Dim i, iCount As Integer
iCount = Me.Recordset.RecordCount
For i = 1 To iCount - 1
If Me.txtType = "Act" Then
Me.subPaieBon.LinkChildFields = "FKPaieAct"
End If
If Me.txtType = "Pub" Then
Me.subPaieBon.LinkChildFields = "FKPaiePub"
End If
If Me.txtType = "Mb" Then
Me.subPaieBon.LinkChildFields = "FKPaieMb"
End If
On Error GoTo err
RunCommand acCmdRecordsGoToNext
Next
err:
Thank in advance