N
NevilleT
I have a query with a choose statement that refers to a form. I use an
option box on the form to decide how to sort the records. The Order By line
is:
ORDER BY Choose(Round([Forms]![frmGanttChart].[opgSortBy],0),
CInt(nz([MSPID],0)),
Format([StartDate],"dd/mm/yyyy"),
Format([FinishDate],"dd/mm/yyyy"));
The two date sorts work fine. The MSPID will not work. It sorts
alphabetically - 1, 10, 11, 12, 2 etc., not numerically.
The field MSPID is an integer in the table. I have tried using Val, Round
and tried to add the nz to cater for nulls. Nothing works. I checked the
option group number was correct and that is fine. It is either 1, 2 or 3.
Running out of ideas.
option box on the form to decide how to sort the records. The Order By line
is:
ORDER BY Choose(Round([Forms]![frmGanttChart].[opgSortBy],0),
CInt(nz([MSPID],0)),
Format([StartDate],"dd/mm/yyyy"),
Format([FinishDate],"dd/mm/yyyy"));
The two date sorts work fine. The MSPID will not work. It sorts
alphabetically - 1, 10, 11, 12, 2 etc., not numerically.
The field MSPID is an integer in the table. I have tried using Val, Round
and tried to add the nz to cater for nulls. Nothing works. I checked the
option group number was correct and that is fine. It is either 1, 2 or 3.
Running out of ideas.