Hi all,
Need some help on this one.
I am doing some work for a retailer that uses a Department, Class and Category hierarchy for their products.
I populate the 1st combobox (cboDept) with a list of departments.
Based on the selection made in this combobox, the 2nd combo box (cboClass) needs to be populated with a list of Classes that only exist for the selected Department.
Based on the selection made in this combobox, the 3rd combo box (cboCategory) needs to be populated with a list of Categories that only exist for the selected Department/Class combination.
I have a master list of all Dept/Class/category combinations, and use a macro to create a ranged name for each of Class and Category based upon the results in the combo box.
The macro basically does a if department code = selected department code (cboDept), then list that class item.
The problem is, when to run the macro. Ie what event needs to fire on the combobox to run the macro ?
I cant use OnChange as after I type in the 1st character of the department, the macro will try to run. I may have. I may have 2 departments "Mens Shoes" and "Mens Clothes", so its not until the 6th character is entered that I would get a unique record.
The user may also type in say the 1st 6 characters and the desired selection is highlighted. Without selecting that item, the user may attempt to select from the drop down list on the following combobox.
Not sure if I should be using LostFocus, GotFocus, or what to control when to run the macro.
Any advice would be most welcome.
Need some help on this one.
I am doing some work for a retailer that uses a Department, Class and Category hierarchy for their products.
I populate the 1st combobox (cboDept) with a list of departments.
Based on the selection made in this combobox, the 2nd combo box (cboClass) needs to be populated with a list of Classes that only exist for the selected Department.
Based on the selection made in this combobox, the 3rd combo box (cboCategory) needs to be populated with a list of Categories that only exist for the selected Department/Class combination.
I have a master list of all Dept/Class/category combinations, and use a macro to create a ranged name for each of Class and Category based upon the results in the combo box.
The macro basically does a if department code = selected department code (cboDept), then list that class item.
The problem is, when to run the macro. Ie what event needs to fire on the combobox to run the macro ?
I cant use OnChange as after I type in the 1st character of the department, the macro will try to run. I may have. I may have 2 departments "Mens Shoes" and "Mens Clothes", so its not until the 6th character is entered that I would get a unique record.
The user may also type in say the 1st 6 characters and the desired selection is highlighted. Without selecting that item, the user may attempt to select from the drop down list on the following combobox.
Not sure if I should be using LostFocus, GotFocus, or what to control when to run the macro.
Any advice would be most welcome.