R
requeth
Hello,
I am trying to set the row source to a query in VB so it can be
dynamic depending on which option is chosen the previous form. The
user is on a form, enters data, chooses Ok, and I want the form with
the listbox to pop up, which it does. My problem is setting the row
source in VB. If I set the Row Source to "test1" in properties it
works fine. I've tried several ways of doing this in VB. Ideally I
would prefer it on the previous form for an onclick event. I've tried
putting the horse in front and behind the cart as so:
db1.Form_searchlist.lstSearch = "test1"
DoCmd.OpenForm "searchlist"
And also:
DoCmd.OpenForm "searchlist"
Forms!searchlist!lstSearch = "test1"
I even tried making it an onload event on the searchlist form, but
none of these work. I'm providing the same criteria in every way for
the query, so I should have results on the list box.
Is there a way to do this that actually works?
I am trying to set the row source to a query in VB so it can be
dynamic depending on which option is chosen the previous form. The
user is on a form, enters data, chooses Ok, and I want the form with
the listbox to pop up, which it does. My problem is setting the row
source in VB. If I set the Row Source to "test1" in properties it
works fine. I've tried several ways of doing this in VB. Ideally I
would prefer it on the previous form for an onclick event. I've tried
putting the horse in front and behind the cart as so:
db1.Form_searchlist.lstSearch = "test1"
DoCmd.OpenForm "searchlist"
And also:
DoCmd.OpenForm "searchlist"
Forms!searchlist!lstSearch = "test1"
I even tried making it an onload event on the searchlist form, but
none of these work. I'm providing the same criteria in every way for
the query, so I should have results on the list box.
Is there a way to do this that actually works?