1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Public Sub Actu()
On Error GoTo GestionErreurs
Dim ctl As Control
Me(sConteneur).LinkMasterFields = ""
Me(sConteneur).LinkChildFields = ""
For Each ctl In Me.Controls
If Left(ctl.Name, 6) = "filtre" And Not IsNull(Me(ctl.Name)) Then
Me(sConteneur).LinkChildFields = Me(sConteneur).LinkChildFields _
& "[" & Right(ctl.Name, Len(ctl.Name) - 6) & "];"
Me(sConteneur).LinkMasterFields = Me(sConteneur).LinkMasterFields _
& "[" & ctl.Name & "];"
End If
Next ctl
Exit Sub
GestionErreurs:
Select Case Err.Number
Case 2335 'survient à partir de la 2e affectation d'un champ fils (sans conséquence)
Resume Next
Case Else
MsgBox "Erreur dans Sub Actu : " & Err.Number & " " & Err.Description
End Select
End Sub |
Partager