Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access selected table
Message
De
21/08/2001 13:18:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00546743
Message ID:
00546859
Vues:
14
>>>I have gotten this message before "CANNOT ACCESS SELECTED TABLE" and unfortunately, it doesn't generate an error so it's hard to debug. But I now get it during the interactive change of listbox1:
>>>If thisform.mylistbox1.selected(1)=.t.
>>>select * from office2 into cursor whichoff
>>>endi
>>>If thisform.mylistbox1.selected(2)=.t.
>>>select * from office1 into cursor whichoff
>>>endi
>>>If thisform.mylistbox1.selected(3)=.t.
>>>select * from office0 into cursor whichoff
>>>endi
>>>If thisform.mylistbox1.selected(4)=.t.
>>>select * from office9 into cursor whichoff
>>>endi
>>>
>>>thisform.mylistbox4.rowsource='whichoff'
>>
>>Tim,
>>Change your myListbox.Rowsourcetype to SQL and define SQL in its rowsource.
>>
>>
*myListbox4.init
>>with this
>> .Rowsourcetype = 4
>> .Rowsource = 'select * from '+;
>>  '(crsOffices.Office) into cursor whichoff'
>>endwith
>>
>>*myListbox1.init
>>with this
>> .Rowsourcetype = 4
>> .Rowsource = 'select ...,OfficeCursorName as Office from '+;
>>  '... into cursor crsOffices'
>>endwith
>>*Valid
>>with thisform.myListbox4
>> .requery
>> .listndex=0
>>endwith
>Cetin, I would like to try this but is this line gramatically correct?
>{.Rowsource = 'select ...,OfficeCursorName as Office from '+;
>>  '... into cursor crsOffices'}
No Tim,
I just left it as a skeleton to show where does (crsOffices.Office) come from. If you also use SQL for myListBox1 with a field Office as selection done you could directly get it with crsOffices.Office (w/o querying if myListbox1.Selected(1) ... )
I can't be more specific w/o knowing how myListbox1 is populated.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform