Article ID: 170552
Article Last Modified on 7/1/2004
Control Name Property Value
------------------------------------------------------------------
Data Control Data1 DatabaseName Biblio.mdb
RecordSource SELECT * FROM
[Publishers]
ORDER BY [Name];
Data Control Data2 DatabaseName Biblio.mdb
RecordSource Titles
DBCombo Box DBCombo1 RowSource Data1
ListField Name
Style 2 - dbcDropdownList
DBGrid Control DBGrid1 DataSource Data2
Private Sub DBCombo1_Click(Area As Integer)
If Area = dbcAreaList Then 'User clicked item from the
'combo list.
'Move the data1 recordset to the currently selected
'publisher's record.
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
'Change the RecordSource property for the DBGrid to only
'show records for the currently selected publisher.
Data2.RecordSource = "SELECT * FROM [Titles] WHERE_
[PubID] = " & Data1.Recordset("PubID")
Data2.Refresh
End If
End Sub
Additional query words: kbVBp500 kbVBp600 kbdse kbDSupport kbVBp kbVBp400
Keywords: kbhowto KB170552