cboModel.Text = lblModel.Caption ... does not work !!! 
Author Message
 cboModel.Text = lblModel.Caption ... does not work !!!

Hi folks

I have put combo/text boxes on one frame. When the user selects a
listed item from one frame it is detailed on another frame
using combo/text boxes.

The problem is, one of the combo boxes displays fresh data
only for some of the items on the list and blank for the others.

In the immediate window (at breakpoint):

Given cboModel.Text contains "Model_1" and
   lblModel.Caption contains "Model_2"

I tried the following:

               cboModel.Text = lblModel.Caption  
              ' Now cboModel.Text contains ""
               Me.cboModel.Text = lblModel.Caption
               Me.cboModel.Text = Me.lblModel.Caption
              ' cboModel.Text still shows ""

Am I missing something here? Could the problem be the items
from the list and/or the datasource. The properties for all
combo boxes are similarly set. Some properties of the
buggy combo box are:
  ...
    Data:      DataField   = Model_ID
               DataSource  = datModel          '(read-only)
    List:      BoundColumn = Model_ID          
               ListField   = Model_Designation
               RowSource   = datModel
  ...

Any help would be greatly appreciated.

Thanks

Happy Clem



Sun, 08 Aug 2004 21:38:36 GMT  
 cboModel.Text = lblModel.Caption ... does not work !!!


Quote:
> Hi folks

> I have put combo/text boxes on one frame. When the user
selects a
> listed item from one frame it is detailed on another frame
> using combo/text boxes.

> The problem is, one of the combo boxes displays fresh data
> only for some of the items on the list and blank for the
others.

> In the immediate window (at breakpoint):

> Given cboModel.Text contains "Model_1" and
>    lblModel.Caption contains "Model_2"

> I tried the following:

>                cboModel.Text = lblModel.Caption

For an unbound drop-down listhbox, you would have to make sure
that "Model_2" is in the list before attempting this.  I presume
the same goes for a bound combo.  Is "Model_2" is the data that
supplies the combo's list?


Mon, 09 Aug 2004 00:36:41 GMT  
 cboModel.Text = lblModel.Caption ... does not work !!!

Quote:



...
> > Given cboModel.Text contains "Model_1" and
> >    lblModel.Caption contains "Model_2"

> > I tried the following:

> >                cboModel.Text = lblModel.Caption

> For an unbound drop-down listhbox, you would have to make sure
> that "Model_2" is in the list before attempting this.  I presume
> the same goes for a bound combo.  Is "Model_2" is the data that
> supplies the combo's list?

Thanks much Grinder for responding

Yes, "Model_2" is in the data supplying the combo's list.

Since posting this message, I have dug around and found that
this project has been moved from :

    VB5(SP3) -- MS DBound Grid Control 5 (SP3) "DBGrid32.ocx"
             -- MS DBound List ......  5 (SP3) "DBList32.ocx"

 to VB6(SP5) -- MS DBound Grid Ctl ... 5 (SP3) 'No change
             -- MS DBound List ......  6
     ... there's some Sheridan SSDataWidgets thrown in as well

    (BTW, the combo/text boxes work fine in VB5 )

 Some conflict maybe in OCX's...?
 I am digging around some more ...looking for a DBGrid32.ocx V6
 if there is one.

Happy Clem



Mon, 09 Aug 2004 19:12:46 GMT  
 cboModel.Text = lblModel.Caption ... does not work !!!
I'm not sure what control is having a problem here -- the
Sheridan (DW3) controls?

If that's the case, I think you have to set the "Value" property
instead of the "Text" property.



Tue, 10 Aug 2004 06:45:26 GMT  
 cboModel.Text = lblModel.Caption ... does not work !!!
Beats me, it may be DW3v3.13 , TabCtl32 and DBGrid32. I seem
to remember Sheridan mentioning that some of their controls
require a particular version of the above MS controls. Also
found out that running a VB5 version of the exe on a VB5(DW2)
box, all ok; then running the same exe on a VB6(DW3.13)box the
problem with the combo/text boxes shows up.
I used REGMON from SysInternals to find out what was going on.
I'll try different versions of TabCtl32 and DBGrid32 to see
what happens.  Any ideas, what else I can try ?


Fri, 13 Aug 2004 19:09:54 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Herlp: LIKE in SQL doe not work anymore

2. VB4 text box Align text property not working

3. VB4 text box Align text property not working

4. vb4: put tab chr(9) in label.caption or text box.text

5. Label.Caption/Text.Text question

6. Linking Text File in DAO - does not work.

7. tab to/from text box not working

8. UserControl with Text fields not working in Word

9. Text Form Fields Not Working

10. text selection with mouse not working in combobox

11. Option Compare Text not working

12. FormatCurrency in Bound Rds Text Input Does Not Work

 

 
Powered by phpBB® Forum Software