DBCombo and DataControl
dtaInput is the main DataControl connecting to an Access database. dtaDescription feeds the DBCombo which exists to display a Description instead of the unfriendly DesciptionID. cboRecordType simply provides an integer 1, 2 or 3. The list of descriptions changes according to the content of cboRecordType, hence the three queries.
Private Sub dtaInput_Reposition()
Select Case cboRecordType
Case 1
dtaDescription.RecordSource = "qryTest1"
Case 2
dtaDescription.RecordSource = "qryTest2"
Case 3
dtaDescription.RecordSource = "qryTest3"
End Select
dtaDescription.Refresh
End Sub
The above code works well, with one exception. When the Case changes, cboDescription displays the DescriptionID instead of Description BUT ONLY FOR THE FIRST TIME AFTER THE CHANGE. Continuing to move through the recordset with dtaInput is then ok until another Case change.
Any clues much appreciated. Many thanks.
Clive Astley
__________________
Clive Astley
|