ComboBox or TreeView and Filtering List

  • Thread starter Scott Whetsell, A.S. - WVSP
  • Start date
S

Scott Whetsell, A.S. - WVSP

I'm not sure where to proceed from this point. My scenario is as follows:

When users generate a wrecker incident (towing), we track the information
based on several criteria: County of Incident, Type of Request, Type of
Response, and Wrecker Service Name. The County of Incident is a combobox
table/query listing of all the counties, Type of Request is a combobox value
listing containing two to three values based on how the service is requested,
and the Type of Response is a combobox value listing containing four values.
These three comboboxes are independent of each other. The fourth, Wrecker
Service Name, is dependent on the selections in the previous three.

Each unique wrecker service has a listing in the WreckerServices table.
There are two separate tables (WreckerServicesNIL and WreckerServicesOwnrReq)
which contain the WreckerServiceID and the CountyID along with what services
they can provide. A wrecker service may be assigned to more than one county
in the two tables.

On my form, the user selects responses in the order: County, Type of Request
(which indicates which table the Wrecker Services listing needs to come
from), Type of Response (which filters which services are able to provide
that response), then finally the Wrecker Service itself. I have been able to
create a combobox which will sort first by County (actual county first, then
neighboring counties, then other counties) but displays duplicate entries if
the Wrecker Service is available in more than one county.

I would like the control for the wrecker services to group based on county
name, then list the services underneath, and filter out duplicates. I tried
using Distinct and DistinctRow in the underlying queries with no luck. Each
table containing the WreckerServiceID and CountyID has 4 date fields that
indicate when a particular response was last used in that county, and of
course each WreckerServiceID and CountyID combination is unique.

I don't know if this is beyond the realm of the comboxbox control, and
haven't the slightest clue where to start with a TreeView Control. Any
guidance is appreciated.
 
S

Scott Whetsell, A.S. - WVSP

I realized that I probably shouldn't have the two subtables and instead one
subtable with an extra column that indicates type of request. The primary
fields in the single subtable are now WreckerServiceID, CountyID, and
RequestType. There are four additional date/time fields and four yes/no
fields based on the four response types (last used and available for
assignment, respectively).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top