by Colin Haig » Tue Dec 20, 2005 3:41 am
Jeff
Use aTags
aTags := { {|| nTag := 1,HeadSort(oQuote,oLbx,nTag)},;
{|| nTag := 2,HeadSort(oQuote,oLbx,nTag)},;
{|| nTag := 3,HeadSort(oQuote,oLbx,nTag)},;
{|| nTag := 4,HeadSort(oQuote,oLbx,nTag)},;
{|| nTag := 5,'' },;
{|| nTag := 6,HeadSort(oQuote,oLbx,nTag)}}
static function HeadSort(oQuote,oLbx,nTag)
do case
case nTag == 1
oQuote:SetOrder('QUOTENO')
oQuote:Bottom()
oLbx:GoBottom()
case nTag == 2
oQuote:SetOrder('CLIENT')
oQuote:Top()
oLbx:GoTop()
case nTag == 3
oQuote:SetOrder('QDATE')
oQuote:Top()
case nTag == 4
oQuote:SetOrder('CONTACT')
oQuote:Top()
case nTag == 6
oQuote:SetOrder('PROJECT')
oQuote:Top()
endcase
oLbx:Refresh()
oLbx:SetFocus()
return(nil)
//------------------------------------------------------------------------------//
Hope this helps
Cheers
Colin