Hi Tore,
This confuses me. Isn't that what VIEWS and CA are made for and REQUERY() is used?
Also Listboxes with RowSourceType = 3 will simply refreshed with ListBox.REQUERY()
The idea to bound a Listbox to a cursor created with SELECT SQL that is not in ROWSOURCE or CA/VIEW is the problem.
Using a SQL SELECT and then bound to its cursor is wrong approach to me.
If listboxes cursor is needed for anything else, ist's still no problem because
.cboi1V4_1.ROWSOURCETYPE = 3
.cboi1V4_1.ROWSOURCE = ;
'SELECT'+;
' Cur1.cName,'+;
' TRANSFORM(Cur1.iObj_Ix,"'+dcTrans_Int+'") AS ci1V4_1'+;
' FROM '+THISFORM.gcCur_Requery_i1V4+' AS Cur1'+;
' INTO CURSOR curcboi1V4_1'
will make the Listboxes RowSource available via cursor curcboi1V4_1, and .cboi1V4_1.REQUERY goes for refreshing the data in it.
Lutz
>You must use "safe select".
http://fox.wikis.com/wc.dll?Wiki~GridSafeSelect.
>
>>Hi Rich,
>>You need to keep (.rowsource) used
>>
>>Thank you Thierry. I really appreciate it. I'll have to look for a different tactic.
>>Rich
>>
>>
>>>I keep getting the following message...
>>>"cannot access the selected table".... and it points to the ROWSOURCE property of the listbox.
>>>
>>>I don't get it. The help section says to set the rowsource='' before the query and set it back to its original setting afterward. At least that's what it sounds like its saying. Some of these help messages are really cryptic.
>>>Anyway, I've tried all sorts of things but obviously not the right one.
>>>
>>>Any ideas? Sure could use some help. I'm out of ideas.
>>>
>>>Thanks,
>>>Rich Murillo
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]