Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

combo boxes

Discussion in 'Information Technology' started by Boots, Jul 28, 2006.

Tags:
  1. Boots

    Boots
    Expand Collapse
    Guest

    hi. I'm using a combo box to select a language for each new record. How can
    I set the combo box so that when it is clicked it highlights "English" by
    default. The Languages are in alphabetical order at present.

    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    Black and Gold Boxes Inspirational Stories Jun 28, 2008
    Two Boxes Inspirational Stories Jul 26, 2007

  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    You can set the Combo's Default property to "English", that way not only that
    "English" will be selected when the user press the combo, he won't have to.

    --
    Good Luck
    BS"D


    "Boots" wrote:

    > hi. I'm using a combo box to select a language for each new record. How can
    > I set the combo box so that when it is clicked it highlights "English" by
    > default. The Languages are in alphabetical order at present.
    >
    > Thanks
     
  4. Boots

    Boots
    Expand Collapse
    Guest

    I have tried this by putting "English" in the default value property under
    properties but it isn't working. Would it be better to do it using code?

    "Ofer Cohen" wrote:

    > You can set the Combo's Default property to "English", that way not only that
    > "English" will be selected when the user press the combo, he won't have to.
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Boots" wrote:
    >
    > > hi. I'm using a combo box to select a language for each new record. How can
    > > I set the combo box so that when it is clicked it highlights "English" by
    > > default. The Languages are in alphabetical order at present.
    > >
    > > Thanks
     
  5. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    If the combo RowSource contain Number and string, and you store the number in
    the table, set the default to the number that represent English and not the
    word.

    The default will work only for new records, not with records that already
    exist but the combo is empty, is that the case you are talking about?

    --
    Good Luck
    BS"D


    "Boots" wrote:

    > I have tried this by putting "English" in the default value property under
    > properties but it isn't working. Would it be better to do it using code?
    >
    > "Ofer Cohen" wrote:
    >
    > > You can set the Combo's Default property to "English", that way not only that
    > > "English" will be selected when the user press the combo, he won't have to.
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "Boots" wrote:
    > >
    > > > hi. I'm using a combo box to select a language for each new record. How can
    > > > I set the combo box so that when it is clicked it highlights "English" by
    > > > default. The Languages are in alphabetical order at present.
    > > >
    > > > Thanks
     
  6. Boots

    Boots
    Expand Collapse
    Guest

    Thanks. That is exactly what I was after. In the case of editing records
    with a blank combo box is it possible to just highlight English as a default
    when combo is clicked?

    "Ofer Cohen" wrote:

    > If the combo RowSource contain Number and string, and you store the number in
    > the table, set the default to the number that represent English and not the
    > word.
    >
    > The default will work only for new records, not with records that already
    > exist but the combo is empty, is that the case you are talking about?
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Boots" wrote:
    >
    > > I have tried this by putting "English" in the default value property under
    > > properties but it isn't working. Would it be better to do it using code?
    > >
    > > "Ofer Cohen" wrote:
    > >
    > > > You can set the Combo's Default property to "English", that way not only that
    > > > "English" will be selected when the user press the combo, he won't have to.
    > > >
    > > > --
    > > > Good Luck
    > > > BS"D
    > > >
    > > >
    > > > "Boots" wrote:
    > > >
    > > > > hi. I'm using a combo box to select a language for each new record. How can
    > > > > I set the combo box so that when it is clicked it highlights "English" by
    > > > > default. The Languages are in alphabetical order at present.
    > > > >
    > > > > Thanks
     
  7. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Try this
    On the MouseDown event of the combo, write the code

    If IsNull(Me.ComboName) Then
    Me.ComboName.Text = "English"
    End If


    --
    Good Luck
    BS"D


    "Boots" wrote:

    > Thanks. That is exactly what I was after. In the case of editing records
    > with a blank combo box is it possible to just highlight English as a default
    > when combo is clicked?
    >
    > "Ofer Cohen" wrote:
    >
    > > If the combo RowSource contain Number and string, and you store the number in
    > > the table, set the default to the number that represent English and not the
    > > word.
    > >
    > > The default will work only for new records, not with records that already
    > > exist but the combo is empty, is that the case you are talking about?
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "Boots" wrote:
    > >
    > > > I have tried this by putting "English" in the default value property under
    > > > properties but it isn't working. Would it be better to do it using code?
    > > >
    > > > "Ofer Cohen" wrote:
    > > >
    > > > > You can set the Combo's Default property to "English", that way not only that
    > > > > "English" will be selected when the user press the combo, he won't have to.
    > > > >
    > > > > --
    > > > > Good Luck
    > > > > BS"D
    > > > >
    > > > >
    > > > > "Boots" wrote:
    > > > >
    > > > > > hi. I'm using a combo box to select a language for each new record. How can
    > > > > > I set the combo box so that when it is clicked it highlights "English" by
    > > > > > default. The Languages are in alphabetical order at present.
    > > > > >
    > > > > > Thanks
     
  8. Boots

    Boots
    Expand Collapse
    Guest

    thanks. it doesn't work but it's not an essential part of my form. The user
    will just have to scroll a little bit. thanks for your help

    "Ofer Cohen" wrote:

    > Try this
    > On the MouseDown event of the combo, write the code
    >
    > If IsNull(Me.ComboName) Then
    > Me.ComboName.Text = "English"
    > End If
    >
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Boots" wrote:
    >
    > > Thanks. That is exactly what I was after. In the case of editing records
    > > with a blank combo box is it possible to just highlight English as a default
    > > when combo is clicked?
    > >
    > > "Ofer Cohen" wrote:
    > >
    > > > If the combo RowSource contain Number and string, and you store the number in
    > > > the table, set the default to the number that represent English and not the
    > > > word.
    > > >
    > > > The default will work only for new records, not with records that already
    > > > exist but the combo is empty, is that the case you are talking about?
    > > >
    > > > --
    > > > Good Luck
    > > > BS"D
    > > >
    > > >
    > > > "Boots" wrote:
    > > >
    > > > > I have tried this by putting "English" in the default value property under
    > > > > properties but it isn't working. Would it be better to do it using code?
    > > > >
    > > > > "Ofer Cohen" wrote:
    > > > >
    > > > > > You can set the Combo's Default property to "English", that way not only that
    > > > > > "English" will be selected when the user press the combo, he won't have to.
    > > > > >
    > > > > > --
    > > > > > Good Luck
    > > > > > BS"D
    > > > > >
    > > > > >
    > > > > > "Boots" wrote:
    > > > > >
    > > > > > > hi. I'm using a combo box to select a language for each new record. How can
    > > > > > > I set the combo box so that when it is clicked it highlights "English" by
    > > > > > > default. The Languages are in alphabetical order at present.
    > > > > > >
    > > > > > > Thanks
     
  9. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Another option will be to create an extra field in the combo, that will make
    English to be the first word, and sort it by name.
    Something like

    Select language From TableName
    Order By IIf([language]="English",1,2) , [language]

    --
    Good Luck
    BS"D


    "Boots" wrote:

    > thanks. it doesn't work but it's not an essential part of my form. The user
    > will just have to scroll a little bit. thanks for your help
    >
    > "Ofer Cohen" wrote:
    >
    > > Try this
    > > On the MouseDown event of the combo, write the code
    > >
    > > If IsNull(Me.ComboName) Then
    > > Me.ComboName.Text = "English"
    > > End If
    > >
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "Boots" wrote:
    > >
    > > > Thanks. That is exactly what I was after. In the case of editing records
    > > > with a blank combo box is it possible to just highlight English as a default
    > > > when combo is clicked?
    > > >
    > > > "Ofer Cohen" wrote:
    > > >
    > > > > If the combo RowSource contain Number and string, and you store the number in
    > > > > the table, set the default to the number that represent English and not the
    > > > > word.
    > > > >
    > > > > The default will work only for new records, not with records that already
    > > > > exist but the combo is empty, is that the case you are talking about?
    > > > >
    > > > > --
    > > > > Good Luck
    > > > > BS"D
    > > > >
    > > > >
    > > > > "Boots" wrote:
    > > > >
    > > > > > I have tried this by putting "English" in the default value property under
    > > > > > properties but it isn't working. Would it be better to do it using code?
    > > > > >
    > > > > > "Ofer Cohen" wrote:
    > > > > >
    > > > > > > You can set the Combo's Default property to "English", that way not only that
    > > > > > > "English" will be selected when the user press the combo, he won't have to.
    > > > > > >
    > > > > > > --
    > > > > > > Good Luck
    > > > > > > BS"D
    > > > > > >
    > > > > > >
    > > > > > > "Boots" wrote:
    > > > > > >
    > > > > > > > hi. I'm using a combo box to select a language for each new record. How can
    > > > > > > > I set the combo box so that when it is clicked it highlights "English" by
    > > > > > > > default. The Languages are in alphabetical order at present.
    > > > > > > >
    > > > > > > > Thanks
     

Share This Page