Bonjour,
Encore quelque chose d'à priori simple à faire mais qui me cause des problèmes.
J'ai un sous-formulaire qui affiche le résultat d'une requête.
Je souhaiterais quand je double-clic sur un enregistrement que celui-ci apparaisse dans un msgbox.
A priori on ne peut attribuer que 2 événements à un sous-formulaire : sur entrée(enter), sur sortie(exit).
Sur d'autres sujets j'ai pu lire que dans ce cas il faut attribuer du code au champ lors du double clic sur celui-ci.
Mon formulaire s'appelle : Formulaire1
Mon sous-formulaire : CMRRes
Mon champ : voie
J'ai essayé énormément de chose :
Aucun msgbox ne s'ouvre après double clic sur un enregistrement du champ.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Private Sub Form_CMBRes_DblClick(Cancel As Integer) MsgBox "ok_1" End Sub Private Sub Nom_DblClick(Cancel As Integer) MsgBox "ok_2" End Sub Private Sub CMBRes_Enter() MsgBox "ok_3" End Sub Private Sub Détail_Click() MsgBox "ok_4" End Sub Private Sub Détail_DblClick(Cancel As Integer) MsgBox "ok_5" End Sub Private Sub Détail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) MsgBox "ok_6" End Sub Private Sub Détail_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) MsgBox "ok_7" End Sub Private Sub Form_DblClick(Cancel As Integer) MsgBox "ok_8" End Sub Private Sub CMBRes_DblClick(Cancel As Integer) MsgBox "ok_9" End Sub Private Sub CMBRes_Voie_DblClick(Cancel As Integer) MsgBox "ok_10" End Sub Private Sub Voie_DblClick(Cancel As Integer) MsgBox "ok_11" End Sub
Ce que je voudrai en image :
Comment je peut-on attribuer du code à un champ lors du double-clic sur un enregistrement ?
Merci d'avance
Partager