Hi.
How would I go about setting a list box rowsource to equal that of the
[form's RecordSource], including a filtered [RecordSource]
Try:
If (Len(Me.Filter) > 0) Then
Me!lstList.RowSource = "SELECT * " & _
"FROM " & Me.RecordSource & _
" WHERE " & Me.Filter
Else
Me!lstList.RowSource = Me.RecordSource
End If
Me!lstList.Requery
.... where lstList is the name of the list box. You may have to set the list
box's Bound Column, Column Count, Column Widths, et cetera, Properties to
match the form's RecordSource column information and other list box
information so that the correct column(s) will be displayed in the list box.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.