Does anyone know where I can go to see an example of these two combo boxe
entries?
I would like to select data from combo box A and combo box B will only show
the data that reflects what I selected from combo box A.
Thanks again
It would have been nice if you given an indication of the actual use
of the combo boxes so that a reply would be more specific to your
needs, rather than generic code below.
Let's assume you have a list of companies and a list of projects with
each company perhaps having many projects.
ComboA displays a list of companies. It's Bound column is the
CompanyID field, Number datatype.
ComboB will display just the projects associated with the company
selected in ComboA.
Leave the rowsource of ComboB blank.
Code the ComboA AfterUpdate event:
ComboB.Rowsource = "Select YourTable.ProjectName from YourTable Where
YourTable.CompanyID = " & Me![ComboA] & " Order by ProjectName;"
The selection of the Company in ComboA will automatically filter the
available Projects in ComboB.
The above assumes CompanyID is a Number datatype. You'll need to
adjust the code if the Bound column of Combo A is Text datatype.
Look up in VBA help files:
Where clause + Restrict data to a subset of records
for how to write the where clause for Number, Text, and Data datatype
fields.