1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| Private Sub Commande1_Click()
Dim FrmFolio As Form
Dim strName As String
Dim ctl As Control
Dim SQLFolio As String
SQLFolio = "select Numéro FROM TblFolio;"
Set FrmFolio = Application.CreateForm
With FrmFolio
.DefaultView = 2
.RecordSource = SQLFolio
.Caption = "visualisation folio"
.Width = 5000
.Section(acDetail).Height = 2000
.NavigationButtons = False
.RecordSelectors = True
.AutoCenter = True
strName = FrmFolio.Name
End With
Set ctl = Application.CreateControl(strName, acTextBox, , "", "", 2000, 500, 2500, 300)
With ctl
.Name = "NuméroCopie"
.BackColor = vbWhite
.ForeColor = vbBlack
.FontBold = True
Me.NuméroCopie.ControlSource = "SQLFolio"
End With
Set ctl = Application.CreateControl(strName, acLabel, , "", "", 500, 500, 1500, 300)
With ctl
.Name = "lblNuméro"
.Caption = "IdRèglement"
End With
'DoCmd.RunSQL SQLFolio
'.RecordSource = SQLFolio
End Sub |
Partager