>Hi!
>I have a list box...
>It uses a cursor created via a SQL Statement.
>When I recreate the cursor I get the error.
>'Cannot Access selected table'
>
>I figure I need to set the rowsource to ""
>
>But when I do so:
>thisform.userslist.rowsource=""
>
>I get the message:
>1130 'field' phrase is not found.
>
>How do I set the rowsource to empty?
>
>I also tried " "
>
>This is driving me nuts.
>
>The form is modul!
Tim,
You could set RowSourceType to none. But take the easy way. Since your rowsource is a cursor, set rowsourcetype to SQL and directly put your SQL in Rowsource. Whenever you need to update it just issue a ..UsersList.requery() (ie: in gotfocus).
with this
.Rowsourcetype = 3 or 6 ? SQL
.RowSource = "select ... into cursor myListBox"
endwith
this.requery()
Cetin