combobox hidden column still appearing in text area

M

mitenko

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
 
D

david epsom dot com dot au

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

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

(david)
 
M

mitenko

Hi David,

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

I'm using Access 2003 SP2.
 
D

david epsom dot com dot au

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

(david)
 
D

david epsom dot com dot au

Use
Me.Recalc

or
Me.District.Requery


(david)


david epsom dot com dot au said:
I'll try it again with 2003 on Monday, sorry can't do more till then.

(david)
 
M

mitenko

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.
 
D

david epsom dot com dot au

Both worked for me, Access 2003

(david)

mitenko said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top