M
Mark Kubicki
I have a combobox whose data source is this query, which sorts the records
correctly:
SELECT FixtureTypesNoProject.Type FROM FixtureTypesNoProject
ORDER BY
IIf(InStr(FixtureTypesNoProject.Type,"-")=0,Len(FixtureTypesNoProject.type),InStr(FixtureTypesNoProject.type,"-")-1),
IIf(InStr(FixtureTypesNoProject.type,"EM")=0,[FixtureTypesNoProject.Type],Replace([FixtureTypesNoProject.Type],"EM","0"))
;
however, when I add the following (to include the <all> word at the top of
the combolist...) it no longer sorts
UNION Select "< ALL >" FROM [FixtureTypesNoProject];
SELECT FixtureTypesNoProject.Type FROM FixtureTypesNoProject ORDER BY
IIf(InStr(FixtureTypesNoProject.Type,"-")=0,Len(FixtureTypesNoProject.type),InStr(FixtureTypesNoProject.type,"-")-1),
IIf(InStr(FixtureTypesNoProject.type,"EM")=0,[FixtureTypesNoProject.Type],Replace([FixtureTypesNoProject.Type],"EM","0"))
UNION Select "< ALL >" FROM [FixtureTypesNoProject];
Anysuggestions about how this couldbe accomplished?
many thanks inadvance,
Mark
correctly:
SELECT FixtureTypesNoProject.Type FROM FixtureTypesNoProject
ORDER BY
IIf(InStr(FixtureTypesNoProject.Type,"-")=0,Len(FixtureTypesNoProject.type),InStr(FixtureTypesNoProject.type,"-")-1),
IIf(InStr(FixtureTypesNoProject.type,"EM")=0,[FixtureTypesNoProject.Type],Replace([FixtureTypesNoProject.Type],"EM","0"))
;
however, when I add the following (to include the <all> word at the top of
the combolist...) it no longer sorts
UNION Select "< ALL >" FROM [FixtureTypesNoProject];
SELECT FixtureTypesNoProject.Type FROM FixtureTypesNoProject ORDER BY
IIf(InStr(FixtureTypesNoProject.Type,"-")=0,Len(FixtureTypesNoProject.type),InStr(FixtureTypesNoProject.type,"-")-1),
IIf(InStr(FixtureTypesNoProject.type,"EM")=0,[FixtureTypesNoProject.Type],Replace([FixtureTypesNoProject.Type],"EM","0"))
UNION Select "< ALL >" FROM [FixtureTypesNoProject];
Anysuggestions about how this couldbe accomplished?
many thanks inadvance,
Mark