Hi,
I am battling with the access sorting on a combo box. I know that on a text field access sorts on the first number rather than the whole number.
As a result on my products combo box the results are displayed as:
Solid American White Oak Flooring - Nature Grade - 100mm x 19mm
Solid American White Oak Flooring - Nature Grade - 115mm x 19mm
Solid American White Oak Flooring - Nature Grade - 130mm x 19mm
Solid American White Oak Flooring - Nature Grade - 75mm x 19mm
I want the products to be sorting according to the width of the boards which is the first number 100, 115, 130, 75 etc....
I have looked at various solutions which dont work. The only solution I can think of is to put leading zeros on the first number detected so that the fields sort correctly.
Obviously I need to ensure that all numbers end up the same length so some number will end up longer than others if I just use a stand 3 leading zeros.
I will also have to have this as another field in my table as I dont want those leading zeros actually appearing in the combo box.
This is the end result I am after:
Solid American White Oak Flooring - Nature Grade - 75mm x 19mm
Solid American White Oak Flooring - Nature Grade - 100mm x 19mm
Solid American White Oak Flooring - Nature Grade - 115mm x 19mm
Solid American White Oak Flooring - Nature Grade - 130mm x 19mm
I am not great with VBA code and I have no idea were to start with coding the solution!
Any help is much appreciated.
I am battling with the access sorting on a combo box. I know that on a text field access sorts on the first number rather than the whole number.
As a result on my products combo box the results are displayed as:
Solid American White Oak Flooring - Nature Grade - 100mm x 19mm
Solid American White Oak Flooring - Nature Grade - 115mm x 19mm
Solid American White Oak Flooring - Nature Grade - 130mm x 19mm
Solid American White Oak Flooring - Nature Grade - 75mm x 19mm
I want the products to be sorting according to the width of the boards which is the first number 100, 115, 130, 75 etc....
I have looked at various solutions which dont work. The only solution I can think of is to put leading zeros on the first number detected so that the fields sort correctly.
Obviously I need to ensure that all numbers end up the same length so some number will end up longer than others if I just use a stand 3 leading zeros.
I will also have to have this as another field in my table as I dont want those leading zeros actually appearing in the combo box.
This is the end result I am after:
Solid American White Oak Flooring - Nature Grade - 75mm x 19mm
Solid American White Oak Flooring - Nature Grade - 100mm x 19mm
Solid American White Oak Flooring - Nature Grade - 115mm x 19mm
Solid American White Oak Flooring - Nature Grade - 130mm x 19mm
I am not great with VBA code and I have no idea were to start with coding the solution!
Any help is much appreciated.