Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort data in grid based on logged in user 1

Status
Not open for further replies.

sqlpro

Programmer
Dec 30, 2003
297
NZ
FOLLOWING IS SAMPLE DATA i am showing in a grid
Code:
Assid    Staffname    
516	rajani  
518	Alana

here staffname is logged in user name.
is there any way i can show logged in user record as 1st row
in the grid.
in abv example if logged in user is Alana then 1st row
should be
Code:
Assid    Staffname    
518	Alana  
516	rajani

by the way the data chnages based different options in the screen.
Thank you very much

cheers
 
depends of the recordsource e.g.

if table
index on MyField [decending] TAG myIdx

if sql
sele * from MyData order by MyField [decending]
 
what if data is like
Code:
Assid    Staffname    
518    Alana  
516    rajani  
519    Akash

and logged in user is Alana ?


cheers
 
sele *,IIF(user="Alana",0,1) as SortOrder from MyTable order by SortOrder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top