Oui pardon, je ne suis pas depuis longtemps sur ce forum et je n'ai pas encore l'habitude de mettre mon code sous cette forms.
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
| Dim phor, phoret, pver, nbenr As Integer
Dim nben As Variant
Dim nomcont, valcont As String
masquetoutcont
phor = 667
phoret = 283.5
pver = 283.5
DoCmd.OpenForm "Localisation liste site"
nbenr = Forms![Localisation liste site].RecordsetClone.RecordCount
i = 1
'Affiche et place les étiquettes et les controles
For i = 1 To nbenr
If i = 1 Then
Forms![Localisation].Controls("e" & i).Visible = True
Forms![Localisation].Controls("e" & i).Top = pver
Forms![Localisation].Controls("e" & i).Left = phoret
Forms![Localisation].Controls("s" & i).Visible = True
Forms![Localisation].Controls("s" & i).Top = pver
Forms![Localisation].Controls("s" & i).Left = phor
Else
pver = pver + 400
Forms![Localisation].Controls("e" & i).Visible = True
Forms![Localisation].Controls("e" & i).Top = pver
Forms![Localisation].Controls("e" & i).Left = phoret
Forms![Localisation].Controls("s" & i).Visible = True
Forms![Localisation].Controls("s" & i).Top = pver
Forms![Localisation].Controls("s" & i).Left = phor
End If
Forms![Localisation].Controls("s" & i) = Forms![Localisation liste site]![Site]
If i < nbenr Then
DoCmd.GoToRecord acDataForm, "Localisation liste site", acNext
End If
Next |
En espérant que ma manipulation est correcte, j'ai ajouter la balise code avant le coller de mon code.
Je ne peux mettre cette commande Docmd.openform "Localisation liste site" avec HIDDEN car ACCESS me retourne une erreur lors du lancement de la commande :
DoCmd.GoToRecord acDataForm, "Localisation liste site", acNext
En me disant que cette action ne peut pas être réalisée pour le moment.
Voilà.
Merci encore
Partager