Lets say you have Table1 with the Fields DocType and Document.
Make a query based on Table1. Lets call it Query1.
Activate the Totals by right clicking while in the design view then clicking totals.
Set the Total: for DocType to Group By and Document to Count.
On your form, say Form1, containing a combo box and a list box, set the Row Source of the combo box to Query1.
To get both the DocType and number of documents to display, column count should be 2, column widths say 1”;1” and Bound Column =1.
Now you want another Query, say Query2, also based on Table1.
Untick the Show for DocType, and set the Criteria to
Forms![Form1]![Combo1]
Now set the Row Source for your list box to Query2.
Lastly go back to your combo box, and for the On_Change Event, add the following code.
Forms!Form1!List1.Requery
If it doesn’t make sense, I can email you the db.