Combo Box value and width problems in VBA 
Author Message
 Combo Box value and width problems in VBA

Hi All,
           I have some problems in combo box using VBA. I did a
posting before but didn't have much of a luck.. PLEASE  HELP !!!

My problems

1 When user selects a particular entry in combo box  the value doesn't
 FILL /  DISPLAY in the combo box , but it gets saved in correct
ControlSource.

2 I want to set the fixed column widths for the combo box. I tried
olumncount,  columnwidths but nothing seems to work.

I'm really desperate here and any help on this would be greatly
appreciated.

TIA

- Jeana -

My Codes ..

*-------------------------------------------------------------

'-- Open the Record Set .

Active connection here is   M2MConnect

  Set M2MDBTable = New ADODB.RecordSet

  M2MDBTable.Open " Select fsalespn as Territory,flastname as
Company,fsalcompct ComRate from Slspns", M2MConnect, adOpenStatic,
adLockReadOnly

 '-- Define the properties in Combo box

  With loSOItem.CboFSSalesPn
    .Top = 153
    .Left = 210
    .Width = 45
    .Controlsource = "Sorels.FSSalesPn"
    .Visible = True
  End With

 '-- Populate the Combo Box

 Do Until M2MDBTable.EOF

   '-- Add rows one at a time with 3 columns..

   loSOItem.CboFSSalesPn.Additem _
     M2MDBTable.Fields("Territory").Value _
     & "  " & M2MDBTable.Fields("Company").Value _
     & "  " & M2MDBTable.Fields("ComRate").Value

   '-- Move to next record
   M2MDBTable.MoveNext

 Loop

 '--- Close The Connection and record set

 M2MDBTable.Close
 M2MConnect.Close
 Set M2MDBTable = Nothing
 Set M2MConnect = Nothing

*-------------------------------------------------------------------------------



Sun, 27 Jun 2004 02:14:32 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. How to set default value of combo box to value of record in database

2. Populate a combo box from another combo box selection

3. selecting records for 2nd combo box dependant on first combo box

4. Populating a combo box from another combo box

5. Vb 4.0 Problems updating Text Boxes from Combo Box linked to Data Control

6. Problems making a automatic text box when selecting in a combo box

7. Default value for dropdown combo list box?

8. Out of Memory Error when returning a boundtext value of a combo box

9. Null Values in Data Bound Combo Boxes

10. Default value for Combo Box!

11. Combo Box return value

12. VFP3:Combo Boxes - Can't Add a Value


 
Powered by phpBB® Forum Software