Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RowSourceType
Message
 
 
À
08/07/2005 10:31:17
Michael Johnson
Michael Johnson Services
Northampton, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01030451
Message ID:
01030455
Vues:
15
Try
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
>
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform