1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Public Sub AménagerReport(NomduReport)
Dim ctl As Control
Dim rpt As Report
DoCmd.OpenReport NomduReport, acViewDesign
For Each ctl In Reports(NomduReport).Controls
If InStr(1, ctl.ControlSource, "=[Forms]![Composition de Menu]") Then
ctl.ControlSource = "=[Forms]![Carte]" & Right(ctl.ControlSource, Len(ctl.ControlSource) - 30)
End If
Next ctl
End Sub
Sub AménagerForm(LeFormulaire)
Dim ctl As Control
DoCmd.OpenForm LeFormulaire, acDesign
For Each ctl In Forms(LeFormulaire).Controls
If ctl.ControlType = acComboBox And ctl.Name Like "*cpte*" Then
ctl.ControlType = acTextBox
End If
Next ctl
DoCmd.Close acForm, LeFormulaire, acSaveYes
End Sub |
Partager