Hi,
Currently in my listbox I have a rowsource of
SELECT region_nbr, GEO_REGION FROM qry_choose_region UNION SELECT "*", "-- All Regions --" FROM MsysObjects ORDER BY GEO_REGION;
I would like to assign this rowsource programmatically to the variable strRowSource as shown below.
Me.lstbx_choose_ipa.RowSource = strRowSource
Xtra info: I want to do this because I'm going to assign the value of the rowsource depending on which option the user chooses previously on the form.
The problem is the syntax. When I paste this code I get an error saying it expected the end of the statement. I believe the quotes UNION part in which I add an item to the listbox for "All Regions" is the culprit.
Any ideas on how to assign the statement above to a variable without any errors? Thank you in advance. Mike
Currently in my listbox I have a rowsource of
SELECT region_nbr, GEO_REGION FROM qry_choose_region UNION SELECT "*", "-- All Regions --" FROM MsysObjects ORDER BY GEO_REGION;
I would like to assign this rowsource programmatically to the variable strRowSource as shown below.
Me.lstbx_choose_ipa.RowSource = strRowSource
Xtra info: I want to do this because I'm going to assign the value of the rowsource depending on which option the user chooses previously on the form.
The problem is the syntax. When I paste this code I get an error saying it expected the end of the statement. I believe the quotes UNION part in which I add an item to the listbox for "All Regions" is the culprit.
Any ideas on how to assign the statement above to a variable without any errors? Thank you in advance. Mike