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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
Option Compare Database
Private Sub cmbLigne_AfterUpdate()
Dim lngIDlin As Long
Dim SQL As String
'Liste déroulante Ligne
If Not IsNumeric(Me!cmbLigne) Then Exit Sub
lngIDlin = Me!cmbLigne
SQL = "SELECT IdMachine, Machine, IdLigne FROM TBL_Machine WHERE IdLigne =" & lngIDlin & " ORDER BY Machine"
cmbMachine.RowSource = SQL
cmbMachine.Enabled = True
cmbMachine.SetFocus
cmbMachine.Dropdown
End Sub
Private Sub cmbMachine_AfterUpdate()
Dim lngIDmach As Long
Dim SQL As String
'Liste déroulante Machine
If Not IsNumeric(Me!cmbMachine) Then Exit Sub
lngIDmach = Me!cmbMachine
SQL = " SELECT IdEnsembleArticle, Nom, IdMachine FROM TBL_EnsembleArticle WHERE IdMachine =" & lngIDmach & " ORDER BY Nom"
cmbSEnsemble1.RowSource = SQL
cmbSEnsemble1.Enabled = True
cmbSEnsemble1.SetFocus
cmbSEnsemble1.Dropdown
End Sub
Private Sub cmbSEnsemble1_AfterUpdate()
Dim lngIDSE1 As Long
Dim SQL As String
'Liste déroulante Sous Ensemble 1
If Not IsNumeric(Me!cmbSEnsemble1) Then Exit Sub
lngIDSE1 = Me!cmbSEnsemble1
SQL = " SELECT IdEnsembleArticle, Nom, IdPere FROM TBL_EnsembleArticle WHERE IdPere =" & lngIDSE1 & " ORDER BY Nom"
cmbSEnsemble2.RowSource = SQL
cmbSEnsemble2.Enabled = True
cmbSEnsemble2.SetFocus
cmbSEnsemble2.Dropdown
End Sub
Private Sub cmbSEnsemble2_AfterUpdate()
Dim lngIDSE2 As Long
Dim SQL As String
'Liste déroulante Sous Ensemble 2
If Not IsNumeric(Me!cmbSEnsemble2) Then Exit Sub
lngIDSE2 = Me!cmbSEnsemble2
SQL = " SELECT IdEnsembleArticle, Nom, IdPere FROM TBL_EnsembleArticle WHERE IdPere =" & lngIDSE2 & " ORDER BY Nom"
cmbSEnsemble3.RowSource = SQL
cmbSEnsemble3.Enabled = True
cmbSEnsemble3.SetFocus
cmbSEnsemble3.Dropdown
End Sub
Private Sub cmbSEnsemble3_AfterUpdate()
Dim lngIDSE3 As Long
Dim SQL As String
'Liste déroulante Sous Ensemble 3
If Not IsNumeric(Me!cmbSEnsemble3) Then Exit Sub
lngIDSE3 = Me!cmbSEnsemble3
SQL = " SELECT IdEnsembleArticle, Nom, IdPere FROM TBL_EnsembleArticle WHERE IdPere =" & lngIDSE3 & " ORDER BY Nom"
cmbSEnsemble4.RowSource = SQL
cmbSEnsemble4.Enabled = True
cmbSEnsemble4.SetFocus
cmbSEnsemble4.Dropdown
End Sub
Private Sub cmbSEnsemble4_AfterUpdate()
Dim lngIDSE4 As Long
Dim SQL As String
'Liste déroulante Sous Ensemble 4
If Not IsNumeric(Me!cmbSEnsemble4) Then Exit Sub
lngIDSE4 = Me!cmbSEnsemble4
SQL = " SELECT IdEnsembleArticle, Nom, IdPere FROM TBL_EnsembleArticle WHERE IdPere =" & lngIDSE4 & " ORDER BY Nom"
cmbSEnsemble5.RowSource = SQL
cmbSEnsemble5.Enabled = True
cmbSEnsemble5.SetFocus
cmbSEnsemble5.Dropdown
End Sub |
Partager