Welcome to SPN

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

Sign Up Now!

combobox hidden column still appearing in text area

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

  1. mitenko

    mitenko
    Expand Collapse
    Guest

    Hi y'all,

    I've got a form that switches between English and Nepali, so a user can
    enter data in either language. Data is stored in separate fields
    according to what language it is. The user clicks a button and the form
    changes its fonts and control sources.

    However, switching with a combo box doesn't seem to work. When the
    button is clicked, I collapse the ColumnWidths of the English fields
    and expand the Nepali fields. This works for when you click on the
    combobox and the menu list drops down, however, the text area for the
    combobox (the Value or Text property) is stuck on the first column even
    though its width has been shrunk to 0. So even if a user makes a
    selection from the dropdown, all they get is gibberish (english text
    translated into a nepali font isn't pretty) in the text area.

    According to VB help the combobox displays the first visible column,
    and shrinking a columns width to 0 automatically makes it
    hidden/invisible. Has anyone else encountered this? Is there a way to
    fix it?

    Here's a snippet of the code:

    Public Sub LangSwitch(toNepali As Boolean)
    If (toNepali) Then
    ....
    District_Label.FontName = "Preeti"
    District_Label.FontSize = 13
    District_Label.Caption = "lhNnf"

    District.SetFocus
    District.FontName = "Preeti"
    District.FontSize = 13
    District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    Else
    ....
    District_Label.FontName = "MS Sans Serif"
    District_Label.FontSize = 8
    District_Label.Caption = "District"

    'Debug.Print CStr(District.ColumnWidths)
    District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    District.FontName = "MS Sans Serif"
    District.FontSize = 8
    End If
    End Sub
     
  2. Loading...


  3. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    works for me, "0;", ";0", Access 2000.

    Try it without the fixed width columns "1 in" in case
    that is confusing it.

    (david)



    "mitenko" <mitenko@gmail.com> wrote in message
    news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    > Hi y'all,
    >
    > I've got a form that switches between English and Nepali, so a user can
    > enter data in either language. Data is stored in separate fields
    > according to what language it is. The user clicks a button and the form
    > changes its fonts and control sources.
    >
    > However, switching with a combo box doesn't seem to work. When the
    > button is clicked, I collapse the ColumnWidths of the English fields
    > and expand the Nepali fields. This works for when you click on the
    > combobox and the menu list drops down, however, the text area for the
    > combobox (the Value or Text property) is stuck on the first column even
    > though its width has been shrunk to 0. So even if a user makes a
    > selection from the dropdown, all they get is gibberish (english text
    > translated into a nepali font isn't pretty) in the text area.
    >
    > According to VB help the combobox displays the first visible column,
    > and shrinking a columns width to 0 automatically makes it
    > hidden/invisible. Has anyone else encountered this? Is there a way to
    > fix it?
    >
    > Here's a snippet of the code:
    >
    > Public Sub LangSwitch(toNepali As Boolean)
    > If (toNepali) Then
    > ....
    > District_Label.FontName = "Preeti"
    > District_Label.FontSize = 13
    > District_Label.Caption = "lhNnf"
    >
    > District.SetFocus
    > District.FontName = "Preeti"
    > District.FontSize = 13
    > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    > Else
    > ....
    > District_Label.FontName = "MS Sans Serif"
    > District_Label.FontSize = 8
    > District_Label.Caption = "District"
    >
    > 'Debug.Print CStr(District.ColumnWidths)
    > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    > District.FontName = "MS Sans Serif"
    > District.FontSize = 8
    > End If
    > End Sub
    >
     
  4. mitenko

    mitenko
    Expand Collapse
    Guest

    Hi David,

    thanks for the reply. I tried what you suggested but it didn't work.

    I'm using Access 2003 SP2.

    david epsom dot com dot au wrote:
    > works for me, "0;", ";0", Access 2000.
    >
    > Try it without the fixed width columns "1 in" in case
    > that is confusing it.
    >
    > (david)
    >
    >
    >
    > "mitenko" <mitenko@gmail.com> wrote in message
    > news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    > > Hi y'all,
    > >
    > > I've got a form that switches between English and Nepali, so a user can
    > > enter data in either language. Data is stored in separate fields
    > > according to what language it is. The user clicks a button and the form
    > > changes its fonts and control sources.
    > >
    > > However, switching with a combo box doesn't seem to work. When the
    > > button is clicked, I collapse the ColumnWidths of the English fields
    > > and expand the Nepali fields. This works for when you click on the
    > > combobox and the menu list drops down, however, the text area for the
    > > combobox (the Value or Text property) is stuck on the first column even
    > > though its width has been shrunk to 0. So even if a user makes a
    > > selection from the dropdown, all they get is gibberish (english text
    > > translated into a nepali font isn't pretty) in the text area.
    > >
    > > According to VB help the combobox displays the first visible column,
    > > and shrinking a columns width to 0 automatically makes it
    > > hidden/invisible. Has anyone else encountered this? Is there a way to
    > > fix it?
    > >
    > > Here's a snippet of the code:
    > >
    > > Public Sub LangSwitch(toNepali As Boolean)
    > > If (toNepali) Then
    > > ....
    > > District_Label.FontName = "Preeti"
    > > District_Label.FontSize = 13
    > > District_Label.Caption = "lhNnf"
    > >
    > > District.SetFocus
    > > District.FontName = "Preeti"
    > > District.FontSize = 13
    > > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    > > Else
    > > ....
    > > District_Label.FontName = "MS Sans Serif"
    > > District_Label.FontSize = 8
    > > District_Label.Caption = "District"
    > >
    > > 'Debug.Print CStr(District.ColumnWidths)
    > > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    > > District.FontName = "MS Sans Serif"
    > > District.FontSize = 8
    > > End If
    > > End Sub
    > >
     
  5. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    I'll try it again with 2003 on Monday, sorry can't do more till then.

    (david)

    "mitenko" <mitenko@gmail.com> wrote in message
    news:1152259748.895871.322980@p79g2000cwp.googlegroups.com...
    > Hi David,
    >
    > thanks for the reply. I tried what you suggested but it didn't work.
    >
    > I'm using Access 2003 SP2.
    >
    > david epsom dot com dot au wrote:
    >> works for me, "0;", ";0", Access 2000.
    >>
    >> Try it without the fixed width columns "1 in" in case
    >> that is confusing it.
    >>
    >> (david)
    >>
    >>
    >>
    >> "mitenko" <mitenko@gmail.com> wrote in message
    >> news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    >> > Hi y'all,
    >> >
    >> > I've got a form that switches between English and Nepali, so a user can
    >> > enter data in either language. Data is stored in separate fields
    >> > according to what language it is. The user clicks a button and the form
    >> > changes its fonts and control sources.
    >> >
    >> > However, switching with a combo box doesn't seem to work. When the
    >> > button is clicked, I collapse the ColumnWidths of the English fields
    >> > and expand the Nepali fields. This works for when you click on the
    >> > combobox and the menu list drops down, however, the text area for the
    >> > combobox (the Value or Text property) is stuck on the first column even
    >> > though its width has been shrunk to 0. So even if a user makes a
    >> > selection from the dropdown, all they get is gibberish (english text
    >> > translated into a nepali font isn't pretty) in the text area.
    >> >
    >> > According to VB help the combobox displays the first visible column,
    >> > and shrinking a columns width to 0 automatically makes it
    >> > hidden/invisible. Has anyone else encountered this? Is there a way to
    >> > fix it?
    >> >
    >> > Here's a snippet of the code:
    >> >
    >> > Public Sub LangSwitch(toNepali As Boolean)
    >> > If (toNepali) Then
    >> > ....
    >> > District_Label.FontName = "Preeti"
    >> > District_Label.FontSize = 13
    >> > District_Label.Caption = "lhNnf"
    >> >
    >> > District.SetFocus
    >> > District.FontName = "Preeti"
    >> > District.FontSize = 13
    >> > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    >> > Else
    >> > ....
    >> > District_Label.FontName = "MS Sans Serif"
    >> > District_Label.FontSize = 8
    >> > District_Label.Caption = "District"
    >> >
    >> > 'Debug.Print CStr(District.ColumnWidths)
    >> > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    >> > District.FontName = "MS Sans Serif"
    >> > District.FontSize = 8
    >> > End If
    >> > End Sub
    >> >

    >
     
  6. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    Use
    Me.Recalc

    or
    Me.District.Requery


    (david)


    "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
    news:ORpI8GaoGHA.4504@TK2MSFTNGP04.phx.gbl...
    > I'll try it again with 2003 on Monday, sorry can't do more till then.
    >
    > (david)
    >
    > "mitenko" <mitenko@gmail.com> wrote in message
    > news:1152259748.895871.322980@p79g2000cwp.googlegroups.com...
    >> Hi David,
    >>
    >> thanks for the reply. I tried what you suggested but it didn't work.
    >>
    >> I'm using Access 2003 SP2.
    >>
    >> david epsom dot com dot au wrote:
    >>> works for me, "0;", ";0", Access 2000.
    >>>
    >>> Try it without the fixed width columns "1 in" in case
    >>> that is confusing it.
    >>>
    >>> (david)
    >>>
    >>>
    >>>
    >>> "mitenko" <mitenko@gmail.com> wrote in message
    >>> news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    >>> > Hi y'all,
    >>> >
    >>> > I've got a form that switches between English and Nepali, so a user
    >>> > can
    >>> > enter data in either language. Data is stored in separate fields
    >>> > according to what language it is. The user clicks a button and the
    >>> > form
    >>> > changes its fonts and control sources.
    >>> >
    >>> > However, switching with a combo box doesn't seem to work. When the
    >>> > button is clicked, I collapse the ColumnWidths of the English fields
    >>> > and expand the Nepali fields. This works for when you click on the
    >>> > combobox and the menu list drops down, however, the text area for the
    >>> > combobox (the Value or Text property) is stuck on the first column
    >>> > even
    >>> > though its width has been shrunk to 0. So even if a user makes a
    >>> > selection from the dropdown, all they get is gibberish (english text
    >>> > translated into a nepali font isn't pretty) in the text area.
    >>> >
    >>> > According to VB help the combobox displays the first visible column,
    >>> > and shrinking a columns width to 0 automatically makes it
    >>> > hidden/invisible. Has anyone else encountered this? Is there a way to
    >>> > fix it?
    >>> >
    >>> > Here's a snippet of the code:
    >>> >
    >>> > Public Sub LangSwitch(toNepali As Boolean)
    >>> > If (toNepali) Then
    >>> > ....
    >>> > District_Label.FontName = "Preeti"
    >>> > District_Label.FontSize = 13
    >>> > District_Label.Caption = "lhNnf"
    >>> >
    >>> > District.SetFocus
    >>> > District.FontName = "Preeti"
    >>> > District.FontSize = 13
    >>> > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    >>> > Else
    >>> > ....
    >>> > District_Label.FontName = "MS Sans Serif"
    >>> > District_Label.FontSize = 8
    >>> > District_Label.Caption = "District"
    >>> >
    >>> > 'Debug.Print CStr(District.ColumnWidths)
    >>> > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    >>> > District.FontName = "MS Sans Serif"
    >>> > District.FontSize = 8
    >>> > End If
    >>> > End Sub
    >>> >

    >>

    >
    >
     
  7. mitenko

    mitenko
    Expand Collapse
    Guest

    Hi David,

    I tried the Requery some time back, with no success. Unfortunately the
    Recalc doesn't seem to produce any change either. Thanks for the help,
    but I guess I'll have to come up with some way to work around this.

    david epsom dot com dot au wrote:
    > Use
    > Me.Recalc
    >
    > or
    > Me.District.Requery
    >
    >
    > (david)
    >
    >
    > "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
    > news:ORpI8GaoGHA.4504@TK2MSFTNGP04.phx.gbl...
    > > I'll try it again with 2003 on Monday, sorry can't do more till then.
    > >
    > > (david)
    > >
    > > "mitenko" <mitenko@gmail.com> wrote in message
    > > news:1152259748.895871.322980@p79g2000cwp.googlegroups.com...
    > >> Hi David,
    > >>
    > >> thanks for the reply. I tried what you suggested but it didn't work.
    > >>
    > >> I'm using Access 2003 SP2.
    > >>
    > >> david epsom dot com dot au wrote:
    > >>> works for me, "0;", ";0", Access 2000.
    > >>>
    > >>> Try it without the fixed width columns "1 in" in case
    > >>> that is confusing it.
    > >>>
    > >>> (david)
    > >>>
    > >>>
    > >>>
    > >>> "mitenko" <mitenko@gmail.com> wrote in message
    > >>> news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    > >>> > Hi y'all,
    > >>> >
    > >>> > I've got a form that switches between English and Nepali, so a user
    > >>> > can
    > >>> > enter data in either language. Data is stored in separate fields
    > >>> > according to what language it is. The user clicks a button and the
    > >>> > form
    > >>> > changes its fonts and control sources.
    > >>> >
    > >>> > However, switching with a combo box doesn't seem to work. When the
    > >>> > button is clicked, I collapse the ColumnWidths of the English fields
    > >>> > and expand the Nepali fields. This works for when you click on the
    > >>> > combobox and the menu list drops down, however, the text area for the
    > >>> > combobox (the Value or Text property) is stuck on the first column
    > >>> > even
    > >>> > though its width has been shrunk to 0. So even if a user makes a
    > >>> > selection from the dropdown, all they get is gibberish (english text
    > >>> > translated into a nepali font isn't pretty) in the text area.
    > >>> >
    > >>> > According to VB help the combobox displays the first visible column,
    > >>> > and shrinking a columns width to 0 automatically makes it
    > >>> > hidden/invisible. Has anyone else encountered this? Is there a way to
    > >>> > fix it?
    > >>> >
    > >>> > Here's a snippet of the code:
    > >>> >
    > >>> > Public Sub LangSwitch(toNepali As Boolean)
    > >>> > If (toNepali) Then
    > >>> > ....
    > >>> > District_Label.FontName = "Preeti"
    > >>> > District_Label.FontSize = 13
    > >>> > District_Label.Caption = "lhNnf"
    > >>> >
    > >>> > District.SetFocus
    > >>> > District.FontName = "Preeti"
    > >>> > District.FontSize = 13
    > >>> > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    > >>> > Else
    > >>> > ....
    > >>> > District_Label.FontName = "MS Sans Serif"
    > >>> > District_Label.FontSize = 8
    > >>> > District_Label.Caption = "District"
    > >>> >
    > >>> > 'Debug.Print CStr(District.ColumnWidths)
    > >>> > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    > >>> > District.FontName = "MS Sans Serif"
    > >>> > District.FontSize = 8
    > >>> > End If
    > >>> > End Sub
    > >>> >
    > >>

    > >
    > >
     
  8. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    Both worked for me, Access 2003

    (david)

    "mitenko" <mitenko@gmail.com> wrote in message
    news:1153716588.558153.159250@i42g2000cwa.googlegroups.com...
    > Hi David,
    >
    > I tried the Requery some time back, with no success. Unfortunately the
    > Recalc doesn't seem to produce any change either. Thanks for the help,
    > but I guess I'll have to come up with some way to work around this.
    >
    > david epsom dot com dot au wrote:
    >> Use
    >> Me.Recalc
    >>
    >> or
    >> Me.District.Requery
    >>
    >>
    >> (david)
    >>
    >>
    >> "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
    >> news:ORpI8GaoGHA.4504@TK2MSFTNGP04.phx.gbl...
    >> > I'll try it again with 2003 on Monday, sorry can't do more till then.
    >> >
    >> > (david)
    >> >
    >> > "mitenko" <mitenko@gmail.com> wrote in message
    >> > news:1152259748.895871.322980@p79g2000cwp.googlegroups.com...
    >> >> Hi David,
    >> >>
    >> >> thanks for the reply. I tried what you suggested but it didn't work.
    >> >>
    >> >> I'm using Access 2003 SP2.
    >> >>
    >> >> david epsom dot com dot au wrote:
    >> >>> works for me, "0;", ";0", Access 2000.
    >> >>>
    >> >>> Try it without the fixed width columns "1 in" in case
    >> >>> that is confusing it.
    >> >>>
    >> >>> (david)
    >> >>>
    >> >>>
    >> >>>
    >> >>> "mitenko" <mitenko@gmail.com> wrote in message
    >> >>> news:1152166487.296141.270130@p79g2000cwp.googlegroups.com...
    >> >>> > Hi y'all,
    >> >>> >
    >> >>> > I've got a form that switches between English and Nepali, so a user
    >> >>> > can
    >> >>> > enter data in either language. Data is stored in separate fields
    >> >>> > according to what language it is. The user clicks a button and the
    >> >>> > form
    >> >>> > changes its fonts and control sources.
    >> >>> >
    >> >>> > However, switching with a combo box doesn't seem to work. When the
    >> >>> > button is clicked, I collapse the ColumnWidths of the English
    >> >>> > fields
    >> >>> > and expand the Nepali fields. This works for when you click on the
    >> >>> > combobox and the menu list drops down, however, the text area for
    >> >>> > the
    >> >>> > combobox (the Value or Text property) is stuck on the first column
    >> >>> > even
    >> >>> > though its width has been shrunk to 0. So even if a user makes a
    >> >>> > selection from the dropdown, all they get is gibberish (english
    >> >>> > text
    >> >>> > translated into a nepali font isn't pretty) in the text area.
    >> >>> >
    >> >>> > According to VB help the combobox displays the first visible
    >> >>> > column,
    >> >>> > and shrinking a columns width to 0 automatically makes it
    >> >>> > hidden/invisible. Has anyone else encountered this? Is there a way
    >> >>> > to
    >> >>> > fix it?
    >> >>> >
    >> >>> > Here's a snippet of the code:
    >> >>> >
    >> >>> > Public Sub LangSwitch(toNepali As Boolean)
    >> >>> > If (toNepali) Then
    >> >>> > ....
    >> >>> > District_Label.FontName = "Preeti"
    >> >>> > District_Label.FontSize = 13
    >> >>> > District_Label.Caption = "lhNnf"
    >> >>> >
    >> >>> > District.SetFocus
    >> >>> > District.FontName = "Preeti"
    >> >>> > District.FontSize = 13
    >> >>> > District.ColumnWidths = "0;0;0;0;1.5 in;1.5 in;"
    >> >>> > Else
    >> >>> > ....
    >> >>> > District_Label.FontName = "MS Sans Serif"
    >> >>> > District_Label.FontSize = 8
    >> >>> > District_Label.Caption = "District"
    >> >>> >
    >> >>> > 'Debug.Print CStr(District.ColumnWidths)
    >> >>> > District.ColumnWidths = "0;1 in;1 in;1 in;0;0;"
    >> >>> > District.FontName = "MS Sans Serif"
    >> >>> > District.FontSize = 8
    >> >>> > End If
    >> >>> > End Sub
    >> >>> >
    >> >>
    >> >
    >> >

    >
     

Share This Page