Hi,
I can use multiselect with xbrowse of recordset
*
How to go to each record select and do Something
What is the syntax ?
wac := oLbx:aSelected
for i = 1 to len (wac)
*** ???
next
Thanks for your help .
Philippe
MULTISELECT RECORDSET
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MULTISELECT RECORDSET
Code: Select all | Expand
oBrw:lScreenUpdating := .f.
oBrw:Refresh()
//
uSaveBm := oBrw:oRs:BookMark
for i := 1 to Len( oBrw:aSelected )
oBrw:oRs:BookMark := oBrw:aSelected[ i ]
// do anything with the current record of the recordset
// during this loop do not refresh browse
next
oBrw:oRs:BookMark := uSaveBm
//
oBrw:lScreenUpdating := .t.
oBrw:Refresh()
Another way:
Code: Select all | Expand
oBrw:lScreenUpdating := .f.
oBrw:Refresh()
//
uSaveBm := oBrw:oRs:BookMark
cFilter := oBrw:oRs:Filter
oBrw:oRs:Filter := oBrw:aSelected
oBrw:oRs:MoveFirst()
do while !oBrw:oRs:Eof()
// do your work
oBrw:oRs:MoveNext()
enddo
oBrw:oRs:MoveFirst()
oBrw:Filter := cFilter
oBrw:oRs:BookMark := uSaveBm
//
oBrw:lScreenUpdating := .t.
oBrw:Refresh()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marc Venken
- Posts: 1485
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: MULTISELECT RECORDSET
oBrw:lScreenUpdating := .F.
First time i see this one...
I suppose it is adviced for the moments that we process xbrowse records like the sample posted here ?
but where is it build for ? are there more situations its use is better ?
First time i see this one...
I suppose it is adviced for the moments that we process xbrowse records like the sample posted here ?
but where is it build for ? are there more situations its use is better ?
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
Re: MULTISELECT RECORDSET
Thanks for your help .
Here is the code that work for me .
oRs:Filter := oLbx:aSelected
oRs:MoveFirst()
do while !oRs:Eof()
msgalert(oRs:Fields(1):Value)
oRs:MoveNext()
enddo
Thanks
Philippe
Here is the code that work for me .
oRs:Filter := oLbx:aSelected
oRs:MoveFirst()
do while !oRs:Eof()
msgalert(oRs:Fields(1):Value)
oRs:MoveNext()
enddo
Thanks
Philippe