I hope some one is able to help me with this one.
I have a database which is used to search for products by its specifications, i have set up cascading combo boxes to work in the following order.
Profile
Thickness
Width
etc.
So the current row source of one of the Combo boxes is
SELECT DISTINCT [tbltestv2].[Thickness] FROM tbltestv2 WHERE ((([tbltestv2].[profile])=(Forms]![Run ratev2]!cboprofile]))
This basically means that it will search for whatever thicknesses are available in the selected profile.
This is the one that works fine although it is not sorted numerically.
I.e 1, 1.2, 12, 2, 2.5 where I want it as 1, 1.2, 2, 2.5, 12
From here I amended the order by so that it will sort it numerically, In the row source I had the following expression.
SELECT [tbltestv2].[Thickness] FROM tbltestv2 WHERE ((([tbltestv2].[Profile])=[Forms]![run ratev2]![cboprofile])) ORDER BY Val([Thickness]), IIf(Val(Right$([Thickness],1))=0,Right$([Thickness],1),"");
The issue with this one is that it shows duplicate data for instance 1, 1, 1, 1.2, 1.2, 2.5, 2.5, 12, 12, 12
I know that if the beginning of the expression is SELECT DISTINCT it will eliminate this however, the SELECT DISTINCT is conflicting with the ORDER BY and it will not let me do it.
Im not sure whether i have missed out something small and obvious but it has been irritating me for a few days now.
Thank you in advance to anyone who can shed any light on this for me!