Combo box and ranking

  • Thread starter Thread starter FatMax
  • Start date Start date
F

FatMax

X records on a continuous form which I want to number 1 to X. Any ideas
about how I can use a combo to do this e.g. if there are five records to
start with combo displays 1-5. If I choose 3 for first record only 1, 2, 4
and 5 *should* be available for other records.

Form is based on a query so X can't be specified though it's an integer <20
if this helps.

FatMax
 
X records on a continuous form which I want to number 1 to X. Any ideas
about how I can use a combo to do this e.g. if there are five records to
start with combo displays 1-5. If I choose 3 for first record only 1, 2, 4
and 5 *should* be available for other records.

Form is based on a query so X can't be specified though it's an integer <20
if this helps.

Hmmm... tricky!

Try this: create a small table, Num, with a single field N (Long
Integer). Add a field Rank to your table. Base the Combo Box on a
query

SELECT Num.N
FROM Num LEFT JOIN yourtable
ON Num.N = yourtable.Rank
WHERE yourtable.Rank IS NULL
AND Num.N <= NZ(DMax("[Rank]", "[yourtable]"), 1000)
ORDER BY N;

This combo will now display only those values of Rank which have not
been assigned.
 
Back
Top