COMBO BOX, STYLE : DROPDOWN LIST 
Author Message
 COMBO BOX, STYLE : DROPDOWN LIST

Hello, I have a hard time to implement a DROPDOWN LIST!!

Everytimes I am trying to add a new record, I keep on getting 'Text'
Property is read-only....

I understand that if I am creating a new record, for sure it can't find the
value of nothing in my COMBO BOX..... I also tried to set Combo1.ListIndex
= -1 just before .AddNew.....

How can I tell to .AddNew that I will fill with proper data??

Private Sub cmd_ADD_Click()
  On Error GoTo AddErr

  With expeditions.Recordset
     .AddNew 'BOOM.,.,. 'Text' Property is read-only
  End With
'  Combo1 = PREMIER_FOURNISSEUR
  Exit Sub
AddErr:
  MsgBox Err.Description

End Sub

TIA.

--
...



Sat, 24 Jul 2004 13:15:59 GMT  
 COMBO BOX, STYLE : DROPDOWN LIST
Try Combo1.AddItem()

Janne



Quote:
> Hello, I have a hard time to implement a DROPDOWN LIST!!

> Everytimes I am trying to add a new record, I keep on getting 'Text'
> Property is read-only....

> I understand that if I am creating a new record, for sure it can't find
the
> value of nothing in my COMBO BOX..... I also tried to set Combo1.ListIndex
> = -1 just before .AddNew.....

> How can I tell to .AddNew that I will fill with proper data??

> Private Sub cmd_ADD_Click()
>   On Error GoTo AddErr

>   With expeditions.Recordset
>      .AddNew 'BOOM.,.,. 'Text' Property is read-only
>   End With
> '  Combo1 = PREMIER_FOURNISSEUR
>   Exit Sub
> AddErr:
>   MsgBox Err.Description

> End Sub

> TIA.

> --
> ...



Sat, 24 Jul 2004 14:20:50 GMT  
 COMBO BOX, STYLE : DROPDOWN LIST

Crotin

Combo1.AddItem Combo1.Text

or
Combo1.Additem 'SomeValue"

Sukesh



Sat, 24 Jul 2004 14:37:45 GMT  
 COMBO BOX, STYLE : DROPDOWN LIST
Thanks, but it doesn't work

Combo1.AddItem()  ' Compile error expected : =
Combo1.AddItem("")
Combo1.AddItem ""
Combo1.AddItem -1

dont't work

Anything else??

--
...

Quote:
> Try Combo1.AddItem()

> Janne



> > Hello, I have a hard time to implement a DROPDOWN LIST!!

> > Everytimes I am trying to add a new record, I keep on getting 'Text'
> > Property is read-only....

> > I understand that if I am creating a new record, for sure it can't find
> the
> > value of nothing in my COMBO BOX..... I also tried to set
Combo1.ListIndex
> > = -1 just before .AddNew.....

> > How can I tell to .AddNew that I will fill with proper data??

> > Private Sub cmd_ADD_Click()
> >   On Error GoTo AddErr

> >   With expeditions.Recordset
> >      .AddNew 'BOOM.,.,. 'Text' Property is read-only
> >   End With
> > '  Combo1 = PREMIER_FOURNISSEUR
> >   Exit Sub
> > AddErr:
> >   MsgBox Err.Description

> > End Sub

> > TIA.

> > --
> > ...



Sat, 24 Jul 2004 21:49:21 GMT  
 COMBO BOX, STYLE : DROPDOWN LIST
Hi, Crotin:

It seems your combo1 is binding to a recordset. I am not
clear about this. But can you try to populate combo1 with
the field of the recordset?
like:

Combo1.AddItem rst1.Fields("f1")

The result is the same as yours. Probably can solve your
porblem.

Regards,
Andy

Quote:
>-----Original Message-----
>Thanks, but it doesn't work

>Combo1.AddItem()  ' Compile error expected : =
>Combo1.AddItem("")
>Combo1.AddItem ""
>Combo1.AddItem -1

>dont't work

>Anything else??

>--
>....

message

>> Try Combo1.AddItem()

>> Janne


kirjoitti
>> viestiss?:VVJ78.21810


- Show quoted text -

Quote:
>> > Hello, I have a hard time to implement a DROPDOWN
LIST!!

>> > Everytimes I am trying to add a new record, I keep on
getting 'Text'
>> > Property is read-only....

>> > I understand that if I am creating a new record, for
sure it can't find
>> the
>> > value of nothing in my COMBO BOX..... I also tried to
set
>Combo1.ListIndex
>> > = -1 just before .AddNew.....

>> > How can I tell to .AddNew that I will fill with
proper data??

>> > Private Sub cmd_ADD_Click()
>> >   On Error GoTo AddErr

>> >   With expeditions.Recordset
>> >      .AddNew 'BOOM.,.,. 'Text' Property is read-only
>> >   End With
>> > '  Combo1 = PREMIER_FOURNISSEUR
>> >   Exit Sub
>> > AddErr:
>> >   MsgBox Err.Description

>> > End Sub

>> > TIA.

>> > --
>> > ...

>.



Sat, 24 Jul 2004 22:19:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

2. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

3. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

4. Locked Combo Box BUG (Dropdown List Style)

5. Default value for dropdown combo list box?

6. Combo Box - no2 dropdown list problem

7. Combo Box dropdown list

8. Combo Box / Dropdown list

9. Combo Box Dropdown List Width

10. Displaying selected list item in Style #2 combo box

11. Inserting data into combo box with style 2 - drop down list

12. Switch combo-box style between a simple edit box and a DropDown List at run-time?

 

 
Powered by phpBB® Forum Software