clear all
<snip>
Thanks, that worked great!
I put the following code in for the shift and control keys:
* Left mouse button pressed
if nButton = 1
nodefault
do case
case nShift = 1 && SHIFT Pressed
nCurrec = recno()
locate for lSelected
nskipdirection = 1
if found()
if recno() > nCurrec
nskipdirection = -1
endif
else
go top
endif
do while recno() != nCurrec
replace lSelected with .t.
skip nskipdirection
enddo
go nCurrec
replace lSelected with .t.
case nShift = 2 && CTRL pressed
if lSelected
replace lSelected with .f.
else
replace lSelected with .t.
endif
otherwise && Just the mouse button was pressed
if lSelected
nCurrec = recno()
replace all lSelected with .f.
go nCurrec
replace lSelected with .f.
else
nCurrec = recno()
replace all lSelected with .f.
go nCurrec
replace lSelected with .t.
endif
endcase
endif
I did not see any need for the lLastSelected field.
Richard