Hello,
Take the + sign and the " ' " out of the List1.RowSource and the list1.ColumnWidths
With Thisform.list1
.ColumnCount=3
.ColumnWidths=45,270,100
.RowSourceType=2
.RowSource=TableToSearch.c_codigo,c_descri,c_cp
.refresh
endwith
I hope this Helps.
About your other question:
Are you tring to return the value of column2 after the user selects it?
>Hi all,
>
>I have a form with one listbox, this is a search form,
>
>
with thisform.list1
> .ColumnCount=3
> .ColumnWidths='45,270,100'
> .RowSourceType=2
> .RowSource=TableToSearch+'.c_codigo,c_descri,c_cp'
> .refresh
>endwith
>
>now i have a textbox to type what i need to search.
>
>How can i get the value from column2 in ListBox?
>
>Thank's
>
>João Batista