Try to remove the Rowsource empty.
Call this custom method when changes of rowsource is necessary, say somewhere at interactivechange event of a control:
Thisform.sqlSelect()
PROCEDURE sqlselect
DO CASE
CASE oApp.clanguage = "N"
cRowsource = "SELECT oms, tcode FROM Therapeutische_index ORDER BY oms INTO CURSOR cthera"
CASE oApp.clanguage = "F"
cRowsource = "SELECT omsf, tcode FROM Therapeutische_index ORDER BY omsf INTO CURSOR cthera
OTHERWISE
cRowsource = "SELECT oms, tcode FROM Therapeutische_index ORDER BY oms INTO CURSOR cthera
ENDCASE
ENDPROC
Thisform.cboName.Rowsource = cRowsource
Thisform.cboName.Requery()
>
>I am using comboboxes in my program. The Rowsource of the combobox is an
>SQL-STATEMENT. When I run the program I sometimes get the message 'Cannot
>access the selected table' followed by the error message ' Error
>Combobox1.Requery '
>
>In the following text, you can find the properties of my combobox. The
>controlsource is a property of my Application class.
>
> BoundColumn = 2
> RowSourceType = 3
> RowSource = "this.sqlselect"
> ControlSource = "oApp.FiltGnsmTheraIndex"
> Height = 25
> Left = 192
> Style = 0
> Top = 76
> Width = 217
> ZOrderSet = 5
> Name = "Okcombobox1"
>
>
> PROCEDURE sqlselect
> DO CASE
> CASE oApp.clanguage = "N"
> SELECT oms, tcode FROM Therapeutische_index ORDER BY oms INTO CURSOR
>cthera
> CASE oApp.clanguage = "F"
> SELECT omsf, tcode FROM Therapeutische_index ORDER BY omsf INTO
>CURSOR cthera
> OTHERWISE
> SELECT oms, tcode FROM Therapeutische_index ORDER BY oms INTO CURSOR
>cthera
> ENDCASE
> ENDPROC
>
>
> PROCEDURE Destroy
> *-- Destroy the alias created in the RowSource property
> IF USED("cthera")
> USE IN cthera
> ENDIF
> ENDPROC
>
>
>I hope anyone can help me !
>
>Thanks a lot.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."