this is the coding. It just does not allow me to select a second element.
Private Sub cmbCoopName_Click()
'On CoopNom selection, need to load all the data in the fields
'on the Search form.
Dim Rnum As Integer
With AdoCoop.Recordset 'Look into the CooperativeInformation table
If .BOF Then
.MoveFirst
Else
.MoveFirst
End If
Do Until .EOF
If ![CoopNom] = cmbCoopName.Text Then 'verify that the name in the combo box exist in the database
'if it does, all field connect to the ADO will load their
'proper information from that record
'The region cannot be link with a DataSource
'since what is displayed comes from the Region Table.
Rnum = ![Régionnum]
With AdoRegion.Recordset ' Look into the Region table
.MoveFirst
Do Until .EOF
If Rnum = ![Regionnum] Then
cmbCoopRegion.Text = ![Region]
Exit Do
Else
.MoveNext
End If
Loop
End With
Exit Do
Else
.MoveNext
End If
Loop
.MoveFirst
End With
'Convert 0 and 1 to user-friendly interface
'for the Assurance
If ComboAssurance.Text = 0 Then
ComboAssurance.Text = "Non"
Else
ComboAssurance.Text = "Oui"
End If
'Convert 0 and 1 to user-friendly interface
'for the AFIC
If ComboAFIC.Text = 0 Then
ComboAFIC.Text = "Non"
Else
ComboAFIC.Text = "Oui"
End If
'Convert 0 and 1 to user-friendly interface
'for the Animaux Permis
If comboAnimal.Text = 0 Then
comboAnimal.Text = "Non"
Else
comboAnimal.Text = "Oui"
End If
End Sub
Private Sub cmbCoopRegion_Click()
Dim R As String
'The region cannot be link with a DataSource
'since what is displayed comes from the Region Table.
R = cmbCoopRegion.Text
With AdoRegion.Recordset ' Look into the Region table
.MoveFirst
Do Until .EOF
If R = ![Region] Then
MsgBox "take all from that region"
'Bring out all Coop under that region.
Exit Do
Else
.MoveNext
End If
Loop
End With
End Sub
Thanks