RowSource = "orhead.field1,field2,field3,...,fieldN",>I am trying to create a form on the fly, setting the RowSourceType to 6 (List of fields), but cannot figure out how to actually type in the comma delimited list of fields - syntax wise
>Public fForm9 >fForm9 = Createobject('myForm') >fForm9.Show > >Define Class myForm As Form > DataSession = 1 > MaxButton=.F. > MinButton=.F. > Closable=.F. > Top = 0 > Left = 0 > Height = 400 > Width = 750 > DoCreate = .T. > Caption = "Search" > > Add Object grdprices As Grid With ; > Height = 200, Width = 730, RecordSource = "orhead" > >* This is where I want to specify the field names rather than the database 'orhead' > > Add Object lststruc As ListBox With ; > RowSourceType = 8, RowSource = "orhead", ; > Height = 170, Left = 12, MultiSelect = .T., Top = 204, Width = 144 > > Add Object txtsearch As TextBox With ; > Height = 23, Left = 168, Top = 240, Width = 192, Name = "txtSearch" > > Add Object cmdSearch As CommandButton With ; > Top = 264, Left = 168, Height = 27, Width = 84, Caption = "Search" > > Add Object cmdClearFilter As CommandButton With ; > Top = 264, Left = 264, Height = 27, Width = 84, Caption = "Clear filter" > > ADD OBJECT cmdFinished As CommandButton WITH ; > Top = 294, Left = 168, Height = 27, Width = 84, Caption = "Finished" > > Procedure cmdSearch.Click > Local strSearch,ix > strSearch='' > With Thisform.lststruc > For ix=1 To .ListCount > If .Selected(m.ix) > strSearch = strSearch + ; > Iif(Empty(strSearch),'',' or ')+; > '"%%VALUE%%" $ Lower(Transform(' + .List(m.ix) +'))' > Endif > Endfor > Endwith > strSearch = Strtran(strSearch,'%%VALUE%%',Lower(Alltrim(Thisform.txtsearch.Value))) > Select orhead > _Cliptext = strSearch > Set Filter To &strSearch .and. complete <> 'Y' > Thisform.Refresh > Endproc > > Procedure cmdClearFilter.Click > Select orhead > Set Filter TO complete <> 'Y' > Thisform.Refresh > ENDPROC > > PROCEDURE cmdFinished.click > SELECT 1 > set filter to complete <> 'Y' > GO top > thisform.release > endproc > >Enddefine > >>