Me.Visible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me why this code is not working

OnClick Event of lstClickOpen

me.lstClickOpen.Column(1).visible=true

I keep getting a runtime error (424 Object Required) when I do.

The list box has 2 columns Title and form.

Access 2000 format.
 
AFAIK, a listbox column doesn't have a Visible property. to show or hide a
column in a listbox, try setting the ColumnWidths property, as

Me!MyListBox.ColumnWidths = "2 in; 0 in"

for details, see the property's topic in Access Help or VBA Help.

hth
 
The error message means that .Column(1) is a text value,
not an object. The text values don't have any properties
at all: you need to change a property of the combobox.

Also, for a combo box, setting a column not visible is
the same as setting the column width to 0.

Yes, that is different from forms, controls etc, because forms,
controls etc are 'windows', but columns are actually just
formatted text in a line of text inside a multi-line text window.

(david)
 
Back
Top