Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Rowsource from Module to Form Listbox 1

Status
Not open for further replies.

dusterb

IS-IT--Management
Jun 13, 2005
21
US
I'm trying to create a Search Results list which will be displayed in a listbox (Results) on a popup form (ArticleSearchResultsForm). The Search form (ArticleSearchForm) uses a function to build an SQL string that I'd like to pass as the rowsource for the listbox field. Here's what I have:

Form.ArticleSearchResultsForm.Results.RowSource = varSQL
DoCmd.OpenForm "ArticleSearchResultsForm"

It's not working. Any hints?
 
Hi!

Try this:

DoCmd.OpenForm "ArticleSearchResultsForm", , , , , , varSQL

Then in the load event of the form use

Me!Results.RowSource = Me.OpenArgs

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thanks jebry, that works perfectly. Problem solved in under 5 minutes!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top