Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
extraneous browse window
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00005792
Message ID:
00005811
Vues:
44
>>>Given:
>>> Grid with
>>> RecordSource:
>>> SELECT Itmlayer.thickness, Itmlayer.color, Itmlayer.process FROM glass!itmlayer
>>> WHERE Itmlayer.process in (select Process from Process_cursor)
>>> RecordSourceType: SQL
>>> Form.Load:
>>> CREATE CURSOR Process_cursor (Process C(2))
>>> Form.lstProcess:
>>>*** lstProcess.Click
>>>*** Created: 08/14/96
>>>*** Purpose: keep track of selected items in this box.
>>>
>>>FOR nCnt = 1 TO This.ListCount
>>> IF This.Selected(nCnt)
>>> insert into Process_cursor (Process) values (THIS.List(nCnt,2))
>>> ELSE
>>> delete from Process_cursor where process = THIS.List(nCnt,2)
>>> ENDIF
>>>ENDFOR
>>>
>>>
>>>With this code:
>>>
>>> wait window "Command1.Click begin"
>>> THISFORM.Grid1.RecordSource = "SELECT Itmlayer.thickness, Itmlayer.color, Itmlayer.process;
>>> FROM glass!itmlayer WHERE Itmlayer.process in (select Process from Process_cursor)"
>>> wait window "Command1.Click end"
>>>
>>>the CORRECT results are showing up in Grid1, but a browse window is also showing up. Can this be suppressed? How?
>>>
>>
>>direct your SELECT statement into a cursor -- select w/ no destination creates a browse window
>
>Good news, bad news. the browse window is gone, but so is the data in the grid. the grids' contents are now empty.

Is the Data Source for the Grid set correctly? Is there anything in the cursor?

HTH,
Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform