Paolo,

Yes the SQL is just a simple

Well the SELECT statement is built with this ugly thing

    sGender = oEvent.Source.Text
   
    sSQl =     "select " & """" & "name" & """" & " from " & """" _
            & "names" & """" & " where " & """" & "gender" & """"  & " = "
   
    sSQL = sSQL & "'" & sGender & "'"

the sSQL varialbe ends up one of these sttings
    select "name" from "names" where "gender" = 'male'
or
    select "name" from "names" where "gender" = 'female'

What I have is two comboboxes, each allowing the user to select data for a different column on a common row of a table. In ComboBox2 the available options are changed depending on what was choosen in CombobBox1.

Funniest part is this. If I open the form in edit mode, run it - make a selection in combobox1, the values DO NOT change in combobox2. Go back into edit mode and then run again...the values in combobox2 are correct for the new select statement..hope I have explained this well.

Paolo Mantovani wrote:
Hi Andrew,

Alle 16:51, martedì 6 settembre 2005, Andrew Jensen ha scritto:
  
Hi

I have the following question.

I have a dataform with a Combobox control and want to change the SQL
selection statement at run time, how do I get the control to refetch the
data?
    
[...]
  
ComboBox2.ListSource = sSQL

.nope... still no refetch.

This is on OO.o 1.9.125 & 1.9.126
    

Just tried in m122 and it works.
What is the content of sSQL ? Does it work if you set it manually in the combo 
box property-dialog ?

Have you checked the value of the prop ListSourceType ?
http://api.openoffice.org/docs/common/ref/com/sun/star/form/ListSourceType.html


regards
Paolo M

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

Reply via email to