Not sorting the rowsource (1 Viewer)

bbwolff

Registered User.
Local time
Today, 11:19
Joined
Oct 1, 2013
Messages
116
I have some dropdown lists to select on the form.
You can add new values (not in list event) and they add to coloumns in a table. there are blanks as each entry in a different coloumn adds new row. it works more or less ok.
But i'd like to manually add the values, so that those that occur more often appear first. problem is, they get alphabetically sorted.

i have two solutions, but each has flaws and I'm sure it could be done with less complications

Original

SELECT DISTINCT osebje.position FROM osebje;

useless solution

i select OsebjeID and sort by that
problem is I get a lot of blanks.
that would be good if I'd had values in all the rows, but i don't and blanks are added to the dropdown (cause they're not blanks in ID coloumn))

complex solution

add a counter for each coloumn
rewrite the sql for adding so that the value is added for each coloumn into the first blank spot

so the question is - is there a don't sort property for sql

something like

SELECT DISTINCT osebje.position FROM osebje ORDER by rownumber;
 

spikepl

Eledittingent Beliped
Local time
Today, 11:19
Joined
Nov 3, 2010
Messages
6,142
Provide examples of data: what you have and what you want.
 

bbwolff

Registered User.
Local time
Today, 11:19
Joined
Oct 1, 2013
Messages
116
I've got solution through this

Code:
SELECT osebje.polozaj, osebje.OsebjeID
FROM osebje
WHERE (((osebje.polozaj)<>""))
ORDER BY osebje.OsebjeID;

I'vegot a table like this

1___F___
2___B___
3_______C
4___A___
5 _______R
6 _______I
ETC

I want a result in a drop down
F
B
A

select distinct gives me this

A
B
F

and distinct doesn't work with sort by rowid values

some sql solutions are here, not sure how that applies to access
got the solution that works ok anyway
 

Users who are viewing this thread

Top Bottom