>Sorry Guys,
>I am trying to put together a couple of combo boxes where comboB is dependent on CombA via SQL and selection source. This is my code, and it kinda works except it wouldnt put the selected value into my table.
>I have put a customized event into the form where it is activated on the click event of combo A.
>
>my code -->
>local lcRowSource
>lcRowSource = 'Select institude.institude, contact.contactid from institude, contact, discipline where '
>
>lcRowSource = lcRowSource +alltrim(thisform.combo1.value)+ ' = discipline.disciplineid AND discipline.disciplineid = contact.disciplineid'
>
>lcRowSource = lcRowSource + ' AND contact.institude = institude.institudeid into cursor csrDetails'
>With thisform.pageframe1.page1.combo2
> .RowSourceType = 3
> .RowSource = lcRowSource
> .Requery()
> .columncount = 2
> .boundcolumn = 2
> .controlsource = positions.contact1id
>EndWith
>
>--> my code ends
>now, the row values can accept my query statement and comboB will return listing stuff I have requested, but however, the result selected wouldn't return to control source, can someone tell me whats wrong with it? I kinda need this to meet my deadline~ hehe (yes, last minute stuff)
>
>Thankx guys sooo much~
>Tom
Tom, check what is the value of your BoundTo property. If it is .T. and comboox is bound to numeric ControlSource it returns ListIndex instead of value in column to which it is bound
Venelina Jordanova
Outsourcing IT Services Ltd.