Query results in a listbox control

  • Thread starter Thread starter Philipp Post
  • Start date Start date
P

Philipp Post

Good day,

I would like to display the results of a SELECT statement which the
user enters into a textbox dynamically in a listbox, but the first
column is always omited in the results

The forms code is like this:

If SQL_Statement Like "SELECT*" Then
Me.Results_Listbox.ColumnHeads = True
Me.Results_Listbox.ColumnCount = 255
Me.Results_Listbox.RowSource = SQL_Statement
End If

How could this be fixed? Is there propably a better control for this?

Thanks n brgds

Philipp Post
 
Philipp -

Look at the column widths for your listbox. I'll bet the first column is
set to 0". Give all the columns a width and see if that fixes it.
 
Daryl,
Give all the columns a width and see if that fixes it.<

Thanks, that was it. I overlooked to assign that property in the code.

brgds

Philipp Post
 
Back
Top