XPS35
Active member
- Local time
- Today, 10:15
- Joined
- Jul 19, 2022
- Messages
- 163
I have a large table (200,000+ records) of products. I can therefore not use a combo box to select a product. I have created an extra form where the user can select the first 5 positions of the product code via a combo box. Then the user selects a product whose product code starts with the selected 5 positions in the next combo box.
Building up the list of unique 5 position product code takes a bit long. The sql I am using is:
I thought to speed up building up the combobox with an index on the table. However, it is not possible to create an index on part of a field. Even if I define a calculated field in the table, I cannot create an index on that field. I prefer not to use a calculated field that needs to be maintained via code.
Does anyone have a (clean) solution to speed up the build-up of the combobox?
Building up the list of unique 5 position product code takes a bit long. The sql I am using is:
SELECT DISTINCT Left(ProductCode,5) FROM tblProduct
I thought to speed up building up the combobox with an index on the table. However, it is not possible to create an index on part of a field. Even if I define a calculated field in the table, I cannot create an index on that field. I prefer not to use a calculated field that needs to be maintained via code.
Does anyone have a (clean) solution to speed up the build-up of the combobox?